export const __rspack_esm_id=92208;export const __rspack_esm_ids=[92208];export const __webpack_modules__={57075(e,t,i){i.a(e,async function(e,a){try{i.r(t);var s=i(15697),n=i(57527),o=i(79224),r=i(90789),c=i(49588),h=i(148),l=(i(2441),i(55682)),d=(i(41247),i(30013)),u=i(24652),_=i(13263),f=i(35170),g=e([l,f]);[l,f]=g.then?(await g)():g;const m="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",p=["humidifier-modes","humidifier-toggle"],y=(0,c.kp)(d.H,(0,c.Ik)({entity:(0,c.lq)((0,c.Yj)()),name:(0,c.lq)(u.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)()))})),b=[{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 v extends n.WF{setConfig(e){(0,c.vA)(e,y),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=${b} .computeLabel=${this._computeLabelCallback} @value-changed=${this._valueChanged}></ha-form> <ha-expansion-panel outlined> <ha-svg-icon slot="leading-icon" .path=${m}></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=${p} .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,n.AH`ha-form{margin-bottom:24px;display:block}`]}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})],v.prototype,"hass",void 0),(0,s.Cg)([(0,o.wk)()],v.prototype,"_config",void 0),v=(0,s.Cg)([(0,o.EM)("hui-humidifier-card-editor")],v),i.d(t,{HuiHumidifierCardEditor:()=>v}),a()}catch(e){a(e)}})},30013(e,t,i){var a=i(49588);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)())});i.d(t,{},{H:s})}};
//# sourceMappingURL=92208.78a39d18235c6357.js.map