export const __rspack_esm_id=69159;export const __rspack_esm_ids=[69159];export const __webpack_modules__={61831(t,i,e){var s=e(15697),a=e(358),r=e(57527),o=e(79224),h=e(49938),n=e(80189),u=e(96682);class c extends r.WF{render(){const t=this._computeCurrentStatus(),i=this.stateObj.state===u.Hh||this.stateObj.state===u.HV;return r.qy`<div class="target"> ${i?this._localizeState():r.qy`<span class="state-label"> ${this._localizeState()} ${this.stateObj.attributes.mode?r.qy`- ${this._formatters.formatEntityAttributeValue(this.stateObj,"mode")}`:""} </span> <div class="unit">${this._computeTarget()}</div>`} </div> ${t&&!i?r.qy`<div class="current"> ${this._localize("ui.card.humidifier.currently")}: <div class="unit">${t}</div> </div>`:""}`}_computeCurrentStatus(){if(this._formatters&&this.stateObj)return null!=this.stateObj.attributes.current_humidity?`${this._formatters.formatEntityAttributeValue(this.stateObj,"current_humidity")}`:void 0}_computeTarget(){return this._formatters&&this.stateObj&&null!=this.stateObj.attributes.humidity?`${this._formatters.formatEntityAttributeValue(this.stateObj,"humidity")}`:""}_localizeState(){if(this.stateObj.state===u.Hh||this.stateObj.state===u.HV)return this._localize(`state.default.${this.stateObj.state}`);const t=this._formatters.formatEntityState(this.stateObj);if(this.stateObj.attributes.action&&"off"!==this.stateObj.state){return`${this._formatters.formatEntityAttributeValue(this.stateObj,"action")} (${t})`}return t}}c.styles=r.AH`:host{white-space:nowrap;flex-direction:column;justify-content:center;display:flex}.target{color:var(--primary-text-color)}.current{color:var(--secondary-text-color)}.state-label{font-weight:var(--ha-font-weight-bold)}.unit{direction:ltr;display:inline-block}`,(0,s.Cg)([(0,o.wk)(),(0,a.Fg)({context:n.p0,subscribe:!0})],c.prototype,"_formatters",void 0),(0,s.Cg)([(0,o.wk)(),(0,h.IW)()],c.prototype,"_localize",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],c.prototype,"stateObj",void 0),c=(0,s.Cg)([(0,o.EM)("ha-humidifier-state")],c)},25754(t,i,e){e.a(t,async function(t,s){try{e.r(i);var a=e(15697),r=e(57527),o=e(79224),h=e(88293),n=(e(61831),e(72441)),u=e(59366),c=e(58178),l=t([h,u,c]);[h,u,c]=l.then?(await l)():l;class d extends r.WF{setConfig(t){if(!t||!t.entity)throw new Error("Entity must be specified");this._config=t}shouldUpdate(t){return(0,n.LX)(this,t)}render(){if(!this.hass||!this._config)return r.s6;const t=this.hass.states[this._config.entity];return t?r.qy` <hui-generic-entity-row .hass=${this.hass} .config=${this._config}> <ha-humidifier-state .stateObj=${t}> </ha-humidifier-state> </hui-generic-entity-row> `:r.qy` <hui-warning .hass=${this.hass}> ${(0,c.j)(this.hass,this._config.entity)} </hui-warning> `}}d.styles=r.AH`ha-humidifier-state{text-align:right}`,(0,a.Cg)([(0,o.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,a.Cg)([(0,o.wk)()],d.prototype,"_config",void 0),d=(0,a.Cg)([(0,o.EM)("hui-humidifier-entity-row")],d),s()}catch(t){s(t)}})}};
//# sourceMappingURL=69159.065b3333232c8dbe.js.map