usda-hass-config/custom_components/hacs/hacs_frontend_experimental/c.81714150.js

30 lines
2.4 KiB
JavaScript

import{_ as e,j as t,e as i,y as a,d as s,O as l,n as d}from"./main-85e087f9.js";import"./c.eab7754a.js";import{a as r}from"./c.388f6c87.js";import"./c.8e28b461.js";e([d("ha-theme-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!1},{kind:"method",key:"render",value:function(){return a`
<ha-select
.label=${this.label||this.hass.localize("ui.components.theme-picker.theme")}
.value=${this.value}
.required=${this.required}
.disabled=${this.disabled}
@selected=${this._changed}
@closed=${r}
fixedMenuPosition
naturalMenuWidth
>
<mwc-list-item value="remove"
>${this.hass.localize("ui.components.theme-picker.no_theme")}</mwc-list-item
>
${Object.keys(this.hass.themes.themes).sort().map((e=>a`<mwc-list-item .value=${e}>${e}</mwc-list-item>`))}
</ha-select>
`}},{kind:"get",static:!0,key:"styles",value:function(){return s`
ha-select {
width: 100%;
}
`}},{kind:"method",key:"_changed",value:function(e){this.hass&&""!==e.target.value&&(this.value="remove"===e.target.value?void 0:e.target.value,l(this,"value-changed",{value:this.value}))}}]}}),t);let o=e([d("ha-selector-theme")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[i({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[i({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[i()],key:"value",value:void 0},{kind:"field",decorators:[i()],key:"label",value:void 0},{kind:"field",decorators:[i({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[i({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){return a`
<ha-theme-picker
.hass=${this.hass}
.value=${this.value}
.label=${this.label}
.disabled=${this.disabled}
.required=${this.required}
></ha-theme-picker>
`}}]}}),t);export{o as HaThemeSelector};