export const __rspack_esm_id="48465";export const __rspack_esm_ids=["48465"];export const __webpack_modules__={16072(e,t,s){s.a(e,async function(e,a){try{s.r(t),s.d(t,{HuiClimateHvacModesCardFeatureEditor:()=>m});s(18111),s(61701);var o=s(62826),i=s(96196),c=s(97735),h=s(22786),n=s(1087),d=s(52763),l=s(38279),r=e([d]);d=(r.then?(await r)():r)[0];class m extends i.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return i.s6;const e=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0,t={style:"icons",...this._config,customize_modes:void 0!==this._config.hvac_modes},s=this._schema(this.hass.localize,this.hass.formatEntityState,e,t.customize_modes);return i.qy` <ha-form .hass="${this.hass}" .data="${t}" .schema="${s}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}_valueChanged(e){const{customize_modes:t,...s}=e.detail.value,a=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0;if(t&&!s.hvac_modes){const e=(a?.attributes.hvac_modes||[]).concat().sort(l.VV);s.hvac_modes=e}!t&&s.hvac_modes&&delete s.hvac_modes,(0,n.r)(this,"config-changed",{config:s})}constructor(...e){super(...e),this._schema=(0,h.A)((e,t,s,a)=>[{name:"style",selector:{select:{multiple:!1,mode:"list",options:["dropdown","icons"].map(t=>({value:t,label:e(`ui.panel.lovelace.editor.features.types.climate-preset-modes.style_list.${t}`)}))}}},{name:"customize_modes",selector:{boolean:{}}},...a?[{name:"hvac_modes",selector:{select:{reorder:!0,multiple:!0,options:(s?.attributes.hvac_modes||[]).concat().sort(l.VV).map(e=>({value:e,label:s?t(s,e):e}))}}}]:[]]),this._computeLabelCallback=e=>{switch(e.name){case"hvac_modes":case"style":case"customize_modes":return this.hass.localize(`ui.panel.lovelace.editor.features.types.climate-hvac-modes.${e.name}`);default:return""}}}}(0,o.Cg)([(0,c.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,o.Cg)([(0,c.MZ)({attribute:!1})],m.prototype,"context",void 0),(0,o.Cg)([(0,c.wk)()],m.prototype,"_config",void 0),m=(0,o.Cg)([(0,c.EM)("hui-climate-hvac-modes-card-feature-editor")],m),a()}catch(e){a(e)}})}};
//# sourceMappingURL=48465.3cc7bff2b1a11156.js.map