"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[53126],{78917:function(e,t,a){a.a(e,async function(e,n){try{a.r(t);var o,r=a(28430),i=a(97058),l=a(57567),s=a(25979),c=a(12463),u=a(16472),h=(a(28706),a(62062),a(26099),a(15697)),d=a(57527),p=a(51209),y=a(49588),f=a(90789),_=a(148),g=a(55682),m=a(30013),b=e([g]);g=(b.then?(await b)():b)[0];var v=(0,y.kp)(m.H,(0,y.Ik)({type:(0,y.eu)("energy-sources-table"),title:(0,y.lq)((0,y.Yj)()),collection_key:(0,y.lq)((0,y.Yj)()),types:(0,y.lq)((0,y.YO)((0,y.KC)([(0,y.eu)("grid"),(0,y.eu)("solar"),(0,y.eu)("battery"),(0,y.eu)("gas"),(0,y.eu)("water")]))),show_only_totals:(0,y.lq)((0,y.zM)())})),k=["grid","solar","battery","gas","water"],C=function(e){function t(){var e;(0,l.A)(this,t);for(var a=arguments.length,n=new Array(a),o=0;o<a;o++)n[o]=arguments[o];return(e=(0,u.A)(this,t,[].concat(n)))._schema=(0,f.A)(function(e){return[{name:"title",selector:{text:{}}},{name:"",type:"grid",schema:[{name:"types",required:!1,selector:{select:{multiple:!0,mode:"list",options:k.map(function(t){return{value:t,label:e("ui.panel.lovelace.editor.card.energy-sources-table.type_options.".concat(t))}})}}},{name:"show_only_totals",required:!1,selector:{boolean:{}}},{type:"string",name:"collection_key",required:!1}]}]}),e._computeHelperCallback=function(t){if("collection_key"===t.name)return e.hass.localize("ui.panel.lovelace.editor.card.generic.collection_key_description")},e._computeLabelCallback=function(t){switch(t.name){case"types":case"show_only_totals":return e.hass.localize("ui.panel.lovelace.editor.card.energy-sources-table.".concat(t.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,c.A)(t,e),(0,s.A)(t,[{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.hass.localize),t=(0,i.A)({},this._config);return(0,d.qy)(o||(o=(0,r.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," .computeHelper="," @value-changed=","></ha-form>"])),this.hass,t,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-sources-table-card-editor")],C),a.d(t,{HuiEnergySourcesTableCardEditor:function(){return C}}),n()}catch(w){n(w)}})},30013:function(e,t,a){var n=a(49588),o=(0,n.Ik)({type:(0,n.Yj)(),view_layout:(0,n.bz)(),layout_options:(0,n.bz)(),grid_options:(0,n.bz)(),visibility:(0,n.bz)(),disabled:(0,n.lq)((0,n.zM)())});a.d(t,{H:function(){return o}})}}]);
//# sourceMappingURL=53126.09920dd0ea5c1909.js.map