"use strict";(self.webpackChunkknx_frontend=self.webpackChunkknx_frontend||[]).push([[1240],{71240:function(e,i,n){n.r(i);var t,a,o=n(6238),s=n(36683),r=n(89231),l=n(29864),d=n(83647),h=n(8364),u=(n(77052),n(848),n(43859),n(98597)),c=n(196),v=n(33167),f=(n(19887),n(32694),n(59373),n(43799));(0,h.A)([(0,c.EM)("ha-timer-form")],(function(e,i){var n=function(i){function n(){var i;(0,r.A)(this,n);for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return i=(0,l.A)(this,n,[].concat(a)),e(i),i}return(0,d.A)(n,i),(0,s.A)(n)}(i);return{F:n,d:[{kind:"field",decorators:[(0,c.MZ)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,c.MZ)({type:Boolean})],key:"new",value:function(){return!1}},{kind:"field",key:"_item",value:void 0},{kind:"field",decorators:[(0,c.wk)()],key:"_name",value:void 0},{kind:"field",decorators:[(0,c.wk)()],key:"_icon",value:void 0},{kind:"field",decorators:[(0,c.wk)()],key:"_duration",value:void 0},{kind:"field",decorators:[(0,c.wk)()],key:"_restore",value:void 0},{kind:"set",key:"item",value:function(e){this._item=e,e?(this._name=e.name||"",this._icon=e.icon||"",this._duration=e.duration||"00:00:00",this._restore=e.restore||!1):(this._name="",this._icon="",this._duration="00:00:00",this._restore=!1)}},{kind:"method",key:"focus",value:function(){var e=this;this.updateComplete.then((function(){var i;return null===(i=e.shadowRoot)||void 0===i||null===(i=i.querySelector("[dialogInitialFocus]"))||void 0===i?void 0:i.focus()}))}},{kind:"method",key:"render",value:function(){return this.hass?(0,u.qy)(t||(t=(0,o.A)(['\n      <div class="form">\n        <ha-textfield\n          .value=',"\n          .configValue=","\n          @input=","\n          .label=","\n          autoValidate\n          required\n          .validationMessage=","\n          dialogInitialFocus\n        ></ha-textfield>\n        <ha-icon-picker\n          .hass=","\n          .value=","\n          .configValue=","\n          @value-changed=","\n          .label=","\n        ></ha-icon-picker>\n        <ha-textfield\n          .configValue=","\n          .value=","\n          @input=","\n          .label=","\n        ></ha-textfield>\n        <ha-formfield\n          .label=","\n        >\n          <ha-checkbox\n            .configValue=","\n            .checked=","\n            @click=","\n          >\n          </ha-checkbox>\n        </ha-formfield>\n      </div>\n    "])),this._name,"name",this._valueChanged,this.hass.localize("ui.dialogs.helper_settings.generic.name"),this.hass.localize("ui.dialogs.helper_settings.required_error_msg"),this.hass,this._icon,"icon",this._valueChanged,this.hass.localize("ui.dialogs.helper_settings.generic.icon"),"duration",this._duration,this._valueChanged,this.hass.localize("ui.dialogs.helper_settings.timer.duration"),this.hass.localize("ui.dialogs.helper_settings.timer.restore"),"restore",this._restore,this._toggleRestore):u.s6}},{kind:"method",key:"_valueChanged",value:function(e){var i;if(this.new||this._item){e.stopPropagation();var n=e.target.configValue,t=(null===(i=e.detail)||void 0===i?void 0:i.value)||e.target.value;if(this["_".concat(n)]!==t){var a=Object.assign({},this._item);t?a[n]=t:delete a[n],(0,v.r)(this,"value-changed",{value:a})}}}},{kind:"method",key:"_toggleRestore",value:function(){this._restore=!this._restore,(0,v.r)(this,"value-changed",{value:Object.assign(Object.assign({},this._item),{},{restore:this._restore})})}},{kind:"get",static:!0,key:"styles",value:function(){return[f.RF,(0,u.AH)(a||(a=(0,o.A)(["\n        .form {\n          color: var(--primary-text-color);\n        }\n        ha-textfield {\n          display: block;\n          margin: 8px 0;\n        }\n      "])))]}}]}}),u.WF)}}]);