export const __rspack_esm_id="35881";export const __rspack_esm_ids=["35881"];export const __webpack_modules__={37808(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HuiHumidifierCardEditor:()=>b});var s=i(62826),n=i(96196),o=i(44457),r=i(22786),c=i(63533),h=i(1087),l=(i(11382),i(52763),i(67094),i(84698)),d=i(44155),u=i(7382),_=i(16161),f=e([_]);_=(f.then?(await f)():f)[0];const g="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M7 7H9V9H7V7M7 11H9V13H7V11M7 15H9V17H7V15M17 17H11V15H17V17M17 13H11V11H17V13M17 9H11V7H17V9Z",m=["humidifier-modes","humidifier-toggle"],p=(0,c.kp)(l.H,(0,c.Ik)({entity:(0,c.lq)((0,c.Yj)()),name:(0,c.lq)(d.q),theme:(0,c.lq)((0,c.Yj)()),show_current_as_primary:(0,c.lq)((0,c.zM)()),features:(0,c.lq)((0,c.YO)((0,c.bz)()))})),y=[{name:"entity",required:!0,selector:{entity:{domain:"humidifier"}}},{name:"name",selector:{entity_name:{}},context:{entity:"entity"}},{type:"grid",name:"",schema:[{name:"theme",selector:{theme:{}}}]},{name:"show_current_as_primary",selector:{boolean:{}}}];class b extends n.WF{setConfig(e){(0,c.vA)(e,p),this._config=e}render(){if(!this.hass||!this._config)return n.s6;const e=this._config.entity,t=this._featureContext(e);return n.qy` <ha-form .hass="${this.hass}" .data="${this._config}" .schema="${y}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> <ha-expansion-panel outlined> <ha-svg-icon slot="leading-icon" .path="${g}"></ha-svg-icon> <h3 slot="header"> ${this.hass.localize("ui.panel.lovelace.editor.card.generic.features")} </h3> <div class="content"> <hui-card-features-editor .hass="${this.hass}" .context="${t}" .featuresTypes="${m}" .features="${this._config.features??[]}" @features-changed="${this._featuresChanged}" @edit-detail-element="${this._editDetailElement}"></hui-card-features-editor> </div> </ha-expansion-panel> `}_valueChanged(e){(0,h.r)(this,"config-changed",{config:e.detail.value})}_featuresChanged(e){if(e.stopPropagation(),!this._config||!this.hass)return;const t=e.detail.features,i={...this._config,features:t};0===t.length&&delete i.features,(0,h.r)(this,"config-changed",{config:i})}_editDetailElement(e){const t=e.detail.subElementConfig.index,i=this._config.features[t];(0,h.r)(this,"edit-sub-element",{config:i,saveConfig:e=>this._updateFeature(t,e),context:{entity_id:this._config.entity},type:"feature"})}_updateFeature(e,t){const i=this._config.features.concat();i[e]=t;const a={...this._config,features:i};(0,h.r)(this,"config-changed",{config:a})}static get styles(){return[u.U,n.AH`ha-form{display:block;margin-bottom:24px}`]}constructor(...e){super(...e),this._featureContext=(0,r.A)(e=>({entity_id:e})),this._computeLabelCallback=e=>"show_current_as_primary"===e.name?this.hass.localize("ui.panel.lovelace.editor.card.humidifier.show_current_as_primary"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}(0,s.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,s.Cg)([(0,o.wk)()],b.prototype,"_config",void 0),b=(0,s.Cg)([(0,o.EM)("hui-humidifier-card-editor")],b),a()}catch(e){a(e)}})},84698(e,t,i){i.d(t,{H:()=>s});var a=i(63533);const s=(0,a.Ik)({type:(0,a.Yj)(),view_layout:(0,a.bz)(),layout_options:(0,a.bz)(),grid_options:(0,a.bz)(),visibility:(0,a.bz)(),disabled:(0,a.lq)((0,a.zM)())})}};
//# sourceMappingURL=35881.cf1595c0f1b42b3d.js.map