"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[46483],{45534:function(e,t,r){r.a(e,async function(e,n){try{r.r(t);var a=r(36854),s=r(98117),i=r(57567),c=r(25979),o=r(12463),l=r(16472),u=(r(44114),r(26099),r(3362),r(15697)),p=r(57527),y=r(51209),_=r(94465),g=r(39715),d=r(83989),f=e([_]);_=(f.then?(await f)():f)[0];var h=function(e){function t(){return(0,i.A)(this,t),(0,l.A)(this,t,arguments)}return(0,o.A)(t,e),(0,c.A)(t,null,[{key:"generate",value:(r=(0,s.A)((0,a.A)().m(function e(t,r){var n,s,i,c,o,l,u;return(0,a.A)().w(function(e){for(;;)switch(e.n){case 0:if(n=t.collection_key||_.e6,s=t.hidden_cards,i={type:"sections",max_columns:3,sections:[{type:"grid",cards:[],column_span:3}],footer:{card:{type:"energy-date-selection",collection_key:n,opening_direction:"right",vertical_opening_direction:"up"}}},(c=(0,_.tb)(r,{key:n})).prefs){e.n=1;break}return e.n=1,c.refresh();case 1:if((o=c.prefs)&&((0,g.F)(o)||(0,g.$S)(o))){e.n=2;break}return e.a(2,i);case 2:return(l=i.sections[0]).cards.push({type:"energy-compare",collection_key:n,grid_options:{columns:36}}),(0,g.BL)("water","energy-water-graph",o,s)&&l.cards.push({title:r.localize("ui.panel.energy.cards.energy_water_graph_title"),type:"energy-water-graph",collection_key:n,grid_options:{columns:24}}),(0,g.BL)("water","energy-sources-table",o,s)&&l.cards.push({title:r.localize("ui.panel.energy.cards.energy_sources_table_title"),type:"energy-sources-table",collection_key:n,types:["water"],grid_options:{columns:12}}),(0,g.BL)("water","water-sankey",o,s)&&(u=(0,d.V)(o.device_consumption_water,r,function(e){return e.stat_consumption}),l.cards.push({title:r.localize("ui.panel.energy.cards.water_sankey_title"),type:"water-sankey",collection_key:n,group_by_floor:u,group_by_area:u,grid_options:{columns:24}})),e.a(2,i)}},e)})),function(e,t){return r.apply(this,arguments)})}]);var r}(p.mN);h.registryDependencies=[],h=(0,u.Cg)([(0,y.EM)("water-view-strategy")],h),r.d(t,{WaterViewStrategy:function(){return h}}),n()}catch(k){n(k)}})}}]);
//# sourceMappingURL=46483.076b2e37f247310c.js.map