"use strict";(self.webpackChunkknx_frontend=self.webpackChunkknx_frontend||[]).push([[7562],{67562:function(e,n,a){a.r(n),a.d(n,{HaBooleanSelector:function(){return v}});var t,r,i,o=a(6238),l=a(36683),d=a(89231),s=a(29864),c=a(83647),h=a(8364),u=(a(77052),a(98597)),f=a(196),p=a(33167),v=(a(32694),a(13442),a(43689),(0,h.A)([(0,f.EM)("ha-selector-boolean")],(function(e,n){var a=function(n){function a(){var n;(0,d.A)(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n=(0,s.A)(this,a,[].concat(r)),e(n),n}return(0,c.A)(a,n),(0,l.A)(a)}(n);return{F:a,d:[{kind:"field",decorators:[(0,f.MZ)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,f.MZ)({type:Boolean})],key:"value",value:function(){return!1}},{kind:"field",decorators:[(0,f.MZ)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,f.MZ)()],key:"label",value:void 0},{kind:"field",decorators:[(0,f.MZ)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,f.MZ)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"method",key:"render",value:function(){var e;return(0,u.qy)(t||(t=(0,o.A)(["\n      <ha-formfield alignEnd spaceBetween .label=",">\n        <ha-switch\n          .checked=","\n          @change=","\n          .disabled=",'\n        ></ha-switch>\n        <span slot="label">\n          <p class="primary">',"</p>\n          ","\n        </span>\n      </ha-formfield>\n    "])),this.label,null!==(e=this.value)&&void 0!==e?e:!0===this.placeholder,this._handleChange,this.disabled,this.label,this.helper?(0,u.qy)(r||(r=(0,o.A)(['<p class="secondary">',"</p>"])),this.helper):u.s6)}},{kind:"method",key:"_handleChange",value:function(e){var n=e.target.checked;this.value!==n&&(0,p.r)(this,"value-changed",{value:n})}},{kind:"get",static:!0,key:"styles",value:function(){return(0,u.AH)(i||(i=(0,o.A)(["\n      ha-formfield {\n        display: flex;\n        min-height: 56px;\n        align-items: center;\n        --mdc-typography-body2-font-size: 1em;\n      }\n      p {\n        margin: 0;\n      }\n      .secondary {\n        direction: var(--direction);\n        padding-top: 4px;\n        box-sizing: border-box;\n        color: var(--secondary-text-color);\n        font-size: 0.875rem;\n        font-weight: var(--mdc-typography-body2-font-weight, 400);\n      }\n    "])))}}]}}),u.WF))}}]);