export const __rspack_esm_id="378";export const __rspack_esm_ids=["378"];export const __webpack_modules__={24486(t,s,i){var e=i(62826),a=i(96196),r=i(97735),h=i(22675);class n extends a.WF{render(){const t=this._computeCurrentStatus();return a.qy`<div class="target"> ${(0,h.g0)(this.stateObj.state)?this._localizeState():a.qy`<span class="state-label"> ${this._localizeState()} ${this.stateObj.attributes.mode?a.qy`- ${this.hass.formatEntityAttributeValue(this.stateObj,"mode")}`:""} </span> <div class="unit">${this._computeTarget()}</div>`} </div> ${t&&!(0,h.g0)(this.stateObj.state)?a.qy`<div class="current"> ${this.hass.localize("ui.card.climate.currently")}: <div class="unit">${t}</div> </div>`:""}`}_computeCurrentStatus(){if(this.hass&&this.stateObj)return null!=this.stateObj.attributes.current_humidity?`${this.hass.formatEntityAttributeValue(this.stateObj,"current_humidity")}`:void 0}_computeTarget(){return this.hass&&this.stateObj&&null!=this.stateObj.attributes.humidity?`${this.hass.formatEntityAttributeValue(this.stateObj,"humidity")}`:""}_localizeState(){if((0,h.g0)(this.stateObj.state))return this.hass.localize(`state.default.${this.stateObj.state}`);const t=this.hass.formatEntityState(this.stateObj);if(this.stateObj.attributes.action&&this.stateObj.state!==h.KF){return`${this.hass.formatEntityAttributeValue(this.stateObj,"action")} (${t})`}return t}}n.styles=a.AH`:host{display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.target{color:var(--primary-text-color)}.current{color:var(--secondary-text-color)}.state-label{font-weight:var(--ha-font-weight-bold)}.unit{display:inline-block;direction:ltr}`,(0,e.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"hass",void 0),(0,e.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"stateObj",void 0),n=(0,e.Cg)([(0,r.EM)("ha-humidifier-state")],n)},53537(t,s,i){i.a(t,async function(t,e){try{i.r(s);var a=i(62826),r=i(96196),h=i(97735),n=i(25240),o=(i(24486),i(784)),u=i(79757),c=i(85979),l=t([n,u,c]);[n,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,o.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 .hass="${this.hass}" .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,h.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,a.Cg)([(0,h.wk)()],d.prototype,"_config",void 0),d=(0,a.Cg)([(0,h.EM)("hui-humidifier-entity-row")],d),e()}catch(t){e(t)}})}};
//# sourceMappingURL=378.cb5043e729724a79.js.map