export const __rspack_esm_id=1842;export const __rspack_esm_ids=[1842];export const __webpack_modules__={26153(e,i,t){t.a(e,async function(e,n){try{t.r(i);t(44114);var c=t(15697),r=t(57527),s=t(79224),o=t(94465),l=t(39715),y=t(83989),a=t(37774),g=e([o]);o=(g.then?(await g)():g)[0];class p extends r.mN{static async generate(e,i){const t=e.collection_key||o.e6,n=e.hidden_cards,c={type:"sections",sections:[],sidebar:{sections:[{cards:[]}],visibility:[a.r]},footer:{card:{type:"energy-date-selection",collection_key:t,opening_direction:"right",vertical_opening_direction:"up"}}},r=(0,o.tb)(i,{key:t});r.prefs||await r.refresh();const s=r.prefs;if(!s||0===s.device_consumption.length&&0===s.energy_sources.length)return c;const g=[],p=[],u=c.sidebar.sections[0];if((0,l.BL)("electricity","energy-distribution",s,n)){const e={title:i.localize("ui.panel.energy.cards.energy_distribution_title"),type:"energy-distribution",collection_key:t};u.cards.push(e),c.sections.push({type:"grid",column_span:1,cards:[e],visibility:[a.B]})}if((0,l.BL)("electricity","energy-grid-balance",s,n)){const e={type:"energy-grid-balance",collection_key:t};u.cards.push(e),c.sections.push({type:"grid",column_span:1,visibility:[a.B],cards:[e]})}if((0,l.BL)("electricity","energy-grid-neutrality-gauge",s,n)&&p.push({type:"energy-grid-neutrality-gauge",collection_key:t}),(0,l.BL)("electricity","energy-solar-consumed-gauge",s,n)&&p.push({type:"energy-solar-consumed-gauge",collection_key:t}),(0,l.BL)("electricity","energy-self-sufficiency-gauge",s,n)&&p.push({type:"energy-self-sufficiency-gauge",collection_key:t}),(0,l.BL)("electricity","energy-carbon-consumed-gauge",s,n)&&p.push({type:"energy-carbon-consumed-gauge",collection_key:t}),p.length&&(u.cards.push({type:"grid",columns:1===p.length?1:2,cards:p}),c.sections.push({type:"grid",column_span:1,visibility:[a.B],cards:1===p.length?[p[0]]:p.map(e=>({...e,grid_options:{columns:6}}))})),g.push({type:"energy-compare",collection_key:t,grid_options:{columns:36}}),(0,l.BL)("electricity","energy-usage-graph",s,n)&&g.push({title:i.localize("ui.panel.energy.cards.energy_usage_graph_title"),type:"energy-usage-graph",collection_key:t,grid_options:{columns:36}}),(0,l.BL)("electricity","energy-solar-graph",s,n)&&g.push({title:i.localize("ui.panel.energy.cards.energy_solar_graph_title"),type:"energy-solar-graph",collection_key:t,grid_options:{columns:36}}),(0,l.BL)("electricity","energy-sources-table",s,n)&&g.push({title:i.localize("ui.panel.energy.cards.energy_sources_table_title"),type:"energy-sources-table",collection_key:t,types:["grid","solar","battery"],grid_options:{columns:36}}),(0,l.BL)("electricity","energy-devices-detail-graph",s,n)&&g.push({title:i.localize("ui.panel.energy.cards.energy_devices_detail_graph_title"),type:"energy-devices-detail-graph",collection_key:t,grid_options:{columns:36}}),(0,l.BL)("electricity","energy-devices-graph",s,n)&&g.push({title:i.localize("ui.panel.energy.cards.energy_devices_graph_title"),type:"energy-devices-graph",collection_key:t,grid_options:{columns:36}}),(0,l.BL)("electricity","energy-sankey",s,n)){const e=(0,y.V)(s.device_consumption,i,e=>e.stat_consumption);g.push({title:i.localize("ui.panel.energy.cards.energy_sankey_title"),type:"energy-sankey",collection_key:t,group_by_floor:e,group_by_area:e,grid_options:{columns:36}})}return c.sections.push({type:"grid",column_span:3,cards:g}),c}}p.registryDependencies=[],p=(0,c.Cg)([(0,s.EM)("energy-view-strategy")],p),t.d(i,{EnergyViewStrategy:()=>p}),n()}catch(e){n(e)}})},37774(e,i,t){t.d(i,{},{B:{condition:"view_columns",max:1},r:{condition:"view_columns",min:2}})}};
//# sourceMappingURL=1842.ba56f7c91e4d55c3.js.map