export const __rspack_esm_id="48465";export const __rspack_esm_ids=["48465"];export const __webpack_modules__={16072(e,t,s){s.r(t),s.d(t,{HuiClimateHvacModesCardFeatureEditor:()=>l});s(18111),s(61701);var o=s(62826),a=s(96196),i=s(44457),c=s(22786),d=s(1087),h=(s(52763),s(38279));class l extends a.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return a.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 a.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,o=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0;if(t&&!s.hvac_modes){const e=(o?.attributes.hvac_modes||[]).concat().sort(h.VV);s.hvac_modes=e}!t&&s.hvac_modes&&delete s.hvac_modes,(0,d.r)(this,"config-changed",{config:s})}constructor(...e){super(...e),this._schema=(0,c.A)((e,t,s,o)=>[{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:{}}},...o?[{name:"hvac_modes",selector:{select:{reorder:!0,multiple:!0,options:(s?.attributes.hvac_modes||[]).concat().sort(h.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,i.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],l.prototype,"context",void 0),(0,o.Cg)([(0,i.wk)()],l.prototype,"_config",void 0),l=(0,o.Cg)([(0,i.EM)("hui-climate-hvac-modes-card-feature-editor")],l)}};
//# sourceMappingURL=48465.83bdc5a279c0acf9.js.map