"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["35881"],{37808:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HuiHumidifierCardEditor:function(){return M}});var n,r,s=i(72153),o=i(44734),c=i(43080),u=i(69683),h=i(6454),l=(i(28706),i(69085),i(40445)),f=i(96196),d=i(77845),g=i(22786),_=i(63533),m=i(1087),y=(i(11382),i(52763),i(67094),i(84698)),p=i(44155),v=i(7382),b=i(16161),C=e([b]);b=(C.then?(await C)():C)[0];var H=["humidifier-modes","humidifier-toggle"],k=(0,_.kp)(y.H,(0,_.Ik)({entity:(0,_.lq)((0,_.Yj)()),name:(0,_.lq)(p.q),theme:(0,_.lq)((0,_.Yj)()),show_current_as_primary:(0,_.lq)((0,_.zM)()),features:(0,_.lq)((0,_.YO)((0,_.bz)()))})),V=[{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:{}}}],M=function(e){function t(){var e;(0,o.A)(this,t);for(var i=arguments.length,a=new Array(i),n=0;n<i;n++)a[n]=arguments[n];return(e=(0,u.A)(this,t,[].concat(a)))._featureContext=(0,g.A)(function(e){return{entity_id:e}}),e._computeLabelCallback=function(t){return"show_current_as_primary"===t.name?e.hass.localize("ui.panel.lovelace.editor.card.humidifier.show_current_as_primary"):e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))},e}return(0,h.A)(t,e),(0,c.A)(t,[{key:"setConfig",value:function(e){(0,_.vA)(e,k),this._config=e}},{key:"render",value:function(){var e;if(!this.hass||!this._config)return f.s6;var t=this._config.entity,i=this._featureContext(t);return(0,f.qy)(n||(n=(0,s.A)([' <ha-form .hass="','" .data="','" .schema="','" .computeLabel="','" @value-changed="','"></ha-form> <ha-expansion-panel outlined> <ha-svg-icon slot="leading-icon" .path="','"></ha-svg-icon> <h3 slot="header"> ',' </h3> <div class="content"> <hui-card-features-editor .hass="','" .context="','" .featuresTypes="','" .features="','" @features-changed="','" @edit-detail-element="','"></hui-card-features-editor> </div> </ha-expansion-panel> '])),this.hass,this._config,V,this._computeLabelCallback,this._valueChanged,"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",this.hass.localize("ui.panel.lovelace.editor.card.generic.features"),this.hass,i,H,null!==(e=this._config.features)&&void 0!==e?e:[],this._featuresChanged,this._editDetailElement)}},{key:"_valueChanged",value:function(e){(0,m.r)(this,"config-changed",{config:e.detail.value})}},{key:"_featuresChanged",value:function(e){if(e.stopPropagation(),this._config&&this.hass){var t=e.detail.features,i=Object.assign(Object.assign({},this._config),{},{features:t});0===t.length&&delete i.features,(0,m.r)(this,"config-changed",{config:i})}}},{key:"_editDetailElement",value:function(e){var t=this,i=e.detail.subElementConfig.index,a=this._config.features[i];(0,m.r)(this,"edit-sub-element",{config:a,saveConfig:function(e){return t._updateFeature(i,e)},context:{entity_id:this._config.entity},type:"feature"})}},{key:"_updateFeature",value:function(e,t){var i=this._config.features.concat();i[e]=t;var a=Object.assign(Object.assign({},this._config),{},{features:i});(0,m.r)(this,"config-changed",{config:a})}}],[{key:"styles",get:function(){return[v.U,(0,f.AH)(r||(r=(0,s.A)(["ha-form{display:block;margin-bottom:24px}"])))]}}])}(f.WF);(0,l.Cg)([(0,d.MZ)({attribute:!1})],M.prototype,"hass",void 0),(0,l.Cg)([(0,d.wk)()],M.prototype,"_config",void 0),M=(0,l.Cg)([(0,d.EM)("hui-humidifier-card-editor")],M),a()}catch(w){a(w)}})},84698:function(e,t,i){i.d(t,{H:function(){return n}});var a=i(63533),n=(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.23b73b791eac38fb.js.map