usda-hass-config/custom_components/hacs/hacs_frontend_experimental/c.33478cf6.js

18 lines
1.4 KiB
JavaScript

import{_ as e,j as t,e as a,y as i,O as d,d as l,n as s}from"./main-85e087f9.js";import"./c.388f6c87.js";import"./c.f4985284.js";import"./c.fea0de05.js";import"./c.8e28b461.js";import"./c.eab7754a.js";import"./c.7398f5d5.js";let o=e([s("ha-selector-boolean")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[a()],key:"hass",value:void 0},{kind:"field",decorators:[a()],key:"value",value:void 0},{kind:"field",decorators:[a()],key:"label",value:void 0},{kind:"field",decorators:[a()],key:"helper",value:void 0},{kind:"field",decorators:[a({type:Boolean})],key:"disabled",value:()=>!1},{kind:"method",key:"render",value:function(){return i`
<ha-formfield alignEnd spaceBetween .label=${this.label}>
<ha-switch
.checked=${this.value}
@change=${this._handleChange}
.disabled=${this.disabled}
></ha-switch>
</ha-formfield>
${this.helper?i`<ha-input-helper-text>${this.helper}</ha-input-helper-text>`:""}
`}},{kind:"method",key:"_handleChange",value:function(e){const t=e.target.checked;this.value!==t&&d(this,"value-changed",{value:t})}},{kind:"get",static:!0,key:"styles",value:function(){return l`
ha-formfield {
display: flex;
height: 56px;
align-items: center;
--mdc-typography-body2-font-size: 1em;
}
`}}]}}),t);export{o as HaBooleanSelector};