export const __rspack_esm_id=54843;export const __rspack_esm_ids=[54843];export const __webpack_modules__={69878(e,a,r){r.a(e,async function(e,t){try{r.r(a);var i=r(15697),o=r(57527),s=r(79224),n=r(49588),c=r(90789),l=r(148),u=r(55682),g=r(30013),h=e([u]);u=(h.then?(await h)():h)[0];const d=(0,n.kp)(g.H,(0,n.Ik)({type:(0,n.KC)([(0,n.eu)("energy-carbon-consumed-gauge"),(0,n.eu)("energy-compare"),(0,n.eu)("energy-distribution"),(0,n.eu)("energy-gas-graph"),(0,n.eu)("energy-grid-balance"),(0,n.eu)("energy-grid-neutrality-gauge"),(0,n.eu)("energy-self-sufficiency-gauge"),(0,n.eu)("energy-solar-consumed-gauge"),(0,n.eu)("energy-solar-graph"),(0,n.eu)("energy-usage-graph"),(0,n.eu)("energy-water-graph"),(0,n.eu)("power-sources-graph")]),title:(0,n.lq)((0,n.Yj)()),collection_key:(0,n.lq)((0,n.Yj)()),show_legend:(0,n.lq)((0,n.zM)()),link_dashboard:(0,n.lq)((0,n.zM)())}));class p extends o.WF{setConfig(e){(0,n.vA)(e,d),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e=this._schema(this._config.type),a={...this._config};return o.qy` <ha-form .hass=${this.hass} .data=${a} .schema=${e} .computeLabel=${this._computeLabelCallback} .computeHelper=${this._computeHelperCallback} @value-changed=${this._valueChanged}></ha-form>`}_valueChanged(e){(0,l.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,c.A)(e=>[..."energy-compare"!==e?[{name:"title",selector:{text:{}}}]:[],..."power-sources-graph"===e||"energy-usage-graph"===e?[{name:"show_legend",default:!0,required:!1,selector:{boolean:{}}}]:[],..."energy-distribution"===e?[{name:"link_dashboard",required:!1,selector:{boolean:{}}}]:[],{type:"string",name:"collection_key",required:!1}]),this._computeHelperCallback=e=>{if("collection_key"===e.name)return this.hass.localize("ui.panel.lovelace.editor.card.generic.collection_key_description")},this._computeLabelCallback=e=>{switch(e.name){case"link_dashboard":return this.hass.localize(`ui.panel.lovelace.editor.card.energy-distribution.${e.name}`);case"show_legend":return this.hass.localize(`ui.panel.lovelace.editor.card.power-sources-graph.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],p.prototype,"_config",void 0),p=(0,i.Cg)([(0,s.EM)("hui-energy-graph-card-editor")],p),r.d(a,{HuiEnergyGraphCardEditor:()=>p}),t()}catch(e){t(e)}})},30013(e,a,r){var t=r(49588);const i=(0,t.Ik)({type:(0,t.Yj)(),view_layout:(0,t.bz)(),layout_options:(0,t.bz)(),grid_options:(0,t.bz)(),visibility:(0,t.bz)(),disabled:(0,t.lq)((0,t.zM)())});r.d(a,{},{H:i})}};
//# sourceMappingURL=54843.22392d67325ec912.js.map