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