"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[54843],{69878:function(e,a,n){n.a(e,async function(e,r){try{n.r(a);var t,o=n(28430),i=n(97058),c=n(74512),s=n(57567),u=n(25979),l=n(12463),g=n(16472),h=(n(28706),n(15697)),d=n(57527),p=n(51209),y=n(49588),f=n(90789),_=n(148),m=n(55682),b=n(30013),k=e([m]);m=(k.then?(await k)():k)[0];var v=(0,y.kp)(b.H,(0,y.Ik)({type:(0,y.KC)([(0,y.eu)("energy-carbon-consumed-gauge"),(0,y.eu)("energy-compare"),(0,y.eu)("energy-distribution"),(0,y.eu)("energy-gas-graph"),(0,y.eu)("energy-grid-balance"),(0,y.eu)("energy-grid-neutrality-gauge"),(0,y.eu)("energy-self-sufficiency-gauge"),(0,y.eu)("energy-solar-consumed-gauge"),(0,y.eu)("energy-solar-graph"),(0,y.eu)("energy-usage-graph"),(0,y.eu)("energy-water-graph"),(0,y.eu)("power-sources-graph")]),title:(0,y.lq)((0,y.Yj)()),collection_key:(0,y.lq)((0,y.Yj)()),show_legend:(0,y.lq)((0,y.zM)()),link_dashboard:(0,y.lq)((0,y.zM)())})),C=function(e){function a(){var e;(0,s.A)(this,a);for(var n=arguments.length,r=new Array(n),t=0;t<n;t++)r[t]=arguments[t];return(e=(0,g.A)(this,a,[].concat(r)))._schema=(0,f.A)(function(e){return[].concat((0,c.A)("energy-compare"!==e?[{name:"title",selector:{text:{}}}]:[]),(0,c.A)("power-sources-graph"===e||"energy-usage-graph"===e?[{name:"show_legend",default:!0,required:!1,selector:{boolean:{}}}]:[]),(0,c.A)("energy-distribution"===e?[{name:"link_dashboard",required:!1,selector:{boolean:{}}}]:[]),[{type:"string",name:"collection_key",required:!1}])}),e._computeHelperCallback=function(a){if("collection_key"===a.name)return e.hass.localize("ui.panel.lovelace.editor.card.generic.collection_key_description")},e._computeLabelCallback=function(a){switch(a.name){case"link_dashboard":return e.hass.localize("ui.panel.lovelace.editor.card.energy-distribution.".concat(a.name));case"show_legend":return e.hass.localize("ui.panel.lovelace.editor.card.power-sources-graph.".concat(a.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(a.name))}},e}return(0,l.A)(a,e),(0,u.A)(a,[{key:"setConfig",value:function(e){(0,y.vA)(e,v),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return d.s6;var e=this._schema(this._config.type),a=(0,i.A)({},this._config);return(0,d.qy)(t||(t=(0,o.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," .computeHelper="," @value-changed=","></ha-form>"])),this.hass,a,e,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}},{key:"_valueChanged",value:function(e){(0,_.r)(this,"config-changed",{config:e.detail.value})}}])}(d.WF);(0,h.Cg)([(0,p.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,h.Cg)([(0,p.wk)()],C.prototype,"_config",void 0),C=(0,h.Cg)([(0,p.EM)("hui-energy-graph-card-editor")],C),n.d(a,{HuiEnergyGraphCardEditor:function(){return C}}),r()}catch(w){r(w)}})},30013:function(e,a,n){var r=n(49588),t=(0,r.Ik)({type:(0,r.Yj)(),view_layout:(0,r.bz)(),layout_options:(0,r.bz)(),grid_options:(0,r.bz)(),visibility:(0,r.bz)(),disabled:(0,r.lq)((0,r.zM)())});n.d(a,{H:function(){return t}})}}]);
//# sourceMappingURL=54843.29a80eea2db2ed15.js.map