export const __rspack_esm_id="33194";export const __rspack_esm_ids=["33194"];export const __webpack_modules__={61844(t,s,e){e.a(t,async function(t,a){try{e.r(s),e.d(s,{HuiWaterTotalBadge:()=>u});e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698);var i=e(62826),o=e(96196),r=e(97735),n=(e(24671),e(67094),e(20058)),c=e(38114),h=e(54706),_=t([c,n]);[c,n]=_.then?(await _)():_;const d="M12,20A6,6 0 0,1 6,14C6,10 12,3.25 12,3.25C12,3.25 18,10 18,14A6,6 0 0,1 12,20Z";class u extends((0,h.E)(o.WF)){setConfig(t){this._config=t}hassSubscribe(){return[(0,c.tb)(this.hass,{key:this._config?.collection_key}).subscribe(t=>{this._data=t})]}shouldUpdate(t){if(t.has("_config")||t.has("_data"))return!0;if(t.has("hass")){const s=t.get("hass");if(!s||!this._entities.size)return!0;for(const t of this._entities)if(s.states[t]!==this.hass?.states[t])return!0}return!1}render(){if(!this._config||!this._data)return o.s6;const{value:t,unit:s}=(0,c.mn)("water",this._data.prefs,this.hass.states,this._entities),e=`${(0,n.ZV)(t,this.hass.locale,{maximumFractionDigits:1})} ${s}`,a=this._config.title||this.hass.localize("ui.panel.lovelace.cards.energy.water_total_title");return o.qy` <ha-badge .label="${a}"> <ha-svg-icon slot="icon" .path="${d}"></ha-svg-icon> ${e} </ha-badge> `}constructor(...t){super(...t),this._entities=new Set,this.hassSubscribeRequiredHostProps=["_config"]}}u.styles=o.AH`ha-badge{--badge-color:var(--energy-water-color)}`,(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],u.prototype,"_config",void 0),(0,i.Cg)([(0,r.wk)()],u.prototype,"_data",void 0),u=(0,i.Cg)([(0,r.EM)("hui-water-total-badge")],u),a()}catch(t){a(t)}})},56434(t,s,e){e.d(s,{e:()=>i});var a=e(81977);function i(t,s,e){return(0,a.P)(t,12*s,e)}}};
//# sourceMappingURL=33194.46f333bded2b7bf6.js.map