export const __rspack_esm_id=84448;export const __rspack_esm_ids=[84448];export const __webpack_modules__={57123(t,e,i){var s=i(15697),a=i(358),r=i(57527),h=i(79224),o=i(49938),u=(i(87882),i(80189)),n=i(96682);class l extends r.WF{render(){const t=this._computeCurrentStatus(),e=this.stateObj.state===n.Hh||this.stateObj.state===n.HV;return r.qy`<div class="target"> ${e?this._localizeState():r.qy`<span class="state-label"> ${this._localizeState()} ${this.stateObj.attributes.preset_mode&&"none"!==this.stateObj.attributes.preset_mode?r.qy`- ${this._formatters.formatEntityAttributeValue(this.stateObj,"preset_mode")}`:r.s6} </span> <div class="unit">${this._computeTarget()}</div>`} </div> ${t&&!e?r.qy` <div class="current"> ${this._localize("ui.card.climate.currently")}: <div class="unit">${t}</div> </div> `:r.s6}`}_computeCurrentStatus(){if(this._formatters&&this.stateObj)return null!=this.stateObj.attributes.current_temperature&&null!=this.stateObj.attributes.current_humidity?`${this._formatters.formatEntityAttributeValue(this.stateObj,"current_temperature")}/\n      ${this._formatters.formatEntityAttributeValue(this.stateObj,"current_humidity")}`:null!=this.stateObj.attributes.current_temperature?this._formatters.formatEntityAttributeValue(this.stateObj,"current_temperature"):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.target_temp_low&&null!=this.stateObj.attributes.target_temp_high?`${this._formatters.formatEntityAttributeValue(this.stateObj,"target_temp_low")}-${this._formatters.formatEntityAttributeValue(this.stateObj,"target_temp_high")}`:null!=this.stateObj.attributes.temperature?this._formatters.formatEntityAttributeValue(this.stateObj,"temperature"):null!=this.stateObj.attributes.target_humidity_low&&null!=this.stateObj.attributes.target_humidity_high?`${this._formatters.formatEntityAttributeValue(this.stateObj,"target_humidity_low")}-${this._formatters.formatEntityAttributeValue(this.stateObj,"target_humidity_high")}`:null!=this.stateObj.attributes.humidity?this._formatters.formatEntityAttributeValue(this.stateObj,"humidity"):"":""}_localizeState(){if(this.stateObj.state===n.Hh||this.stateObj.state===n.HV)return this._localize(`state.default.${this.stateObj.state}`);const t=this._formatters.formatEntityState(this.stateObj);if(this.stateObj.attributes.hvac_action&&"off"!==this.stateObj.state){return`${this._formatters.formatEntityAttributeValue(this.stateObj,"hvac_action")} (${t})`}return t}}l.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);direction:var(--direction)}.state-label{font-weight:var(--ha-font-weight-bold)}.unit{direction:ltr;display:inline-block}`,(0,s.Cg)([(0,h.wk)(),(0,a.Fg)({context:u.p0,subscribe:!0})],l.prototype,"_formatters",void 0),(0,s.Cg)([(0,h.wk)(),(0,o.IW)()],l.prototype,"_localize",void 0),(0,s.Cg)([(0,h.MZ)({attribute:!1})],l.prototype,"stateObj",void 0),l=(0,s.Cg)([(0,h.EM)("ha-climate-state")],l)},83139(t,e,i){i.a(t,async function(t,s){try{i.r(e);var a=i(15697),r=i(57527),h=i(79224),o=(i(57123),i(72441)),u=i(59366),n=i(58178),l=t([u,n]);[u,n]=l.then?(await l)():l;class c 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-climate-state .stateObj=${t}> </ha-climate-state> </hui-generic-entity-row> `:r.qy` <hui-warning .hass=${this.hass}> ${(0,n.j)(this.hass,this._config.entity)} </hui-warning> `}}c.styles=r.AH`ha-climate-state{text-align:right}`,(0,a.Cg)([(0,h.MZ)({attribute:!1})],c.prototype,"hass",void 0),(0,a.Cg)([(0,h.wk)()],c.prototype,"_config",void 0),c=(0,a.Cg)([(0,h.EM)("hui-climate-entity-row")],c),s()}catch(t){s(t)}})}};
//# sourceMappingURL=84448.f94750bb310a9e0c.js.map