"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[20206],{95773:function(e,t,a){a.a(e,async function(e,i){try{a.r(t);var n,c=a(28430),o=a(97058),r=a(74512),s=a(57567),l=a(25979),u=a(12463),d=a(16472),h=(a(28706),a(62062),a(26099),a(15697)),p=a(57527),m=a(51209),_=a(49588),g=a(90789),v=a(148),f=a(55682),y=a(30013),b=e([f]);f=(b.then?(await b)():b)[0];var k=(0,_.kp)(y.H,(0,_.Ik)({type:(0,_.KC)([(0,_.eu)("energy-devices-graph"),(0,_.eu)("energy-devices-detail-graph")]),title:(0,_.lq)((0,_.Yj)()),collection_key:(0,_.lq)((0,_.Yj)()),max_devices:(0,_.lq)((0,_.ai)()),modes:(0,_.lq)((0,_.YO)((0,_.KC)([(0,_.eu)("bar"),(0,_.eu)("pie")]))),hide_compound_stats:(0,_.lq)((0,_.zM)())})),C=["bar","pie"],q=function(e){function t(){var e;(0,s.A)(this,t);for(var a=arguments.length,i=new Array(a),n=0;n<a;n++)i[n]=arguments[n];return(e=(0,d.A)(this,t,[].concat(i)))._schema=(0,g.A)(function(e,t){return[{name:"title",selector:{text:{}}},{name:"",type:"grid",schema:[].concat((0,r.A)("energy-devices-graph"===t?[{name:"modes",required:!1,selector:{select:{multiple:!0,mode:"list",options:C.map(function(t){return{value:t,label:e("ui.panel.lovelace.editor.card.energy-devices-graph.mode_options.".concat(t))}})}}},{name:"hide_compound_stats",required:!1,selector:{boolean:{}}}]:[]),[{name:"max_devices",required:!1,selector:{number:{min:1,mode:"box"}}},{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"modes":case"max_devices":case"hide_compound_stats":return e.hass.localize("ui.panel.lovelace.editor.card.energy-devices-graph.".concat(t.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,u.A)(t,e),(0,l.A)(t,[{key:"setConfig",value:function(e){(0,_.vA)(e,k),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return p.s6;var e=this._schema(this.hass.localize,this._config.type),t=(0,o.A)({},this._config);return(0,p.qy)(n||(n=(0,c.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,v.r)(this,"config-changed",{config:e.detail.value})}}])}(p.WF);(0,h.Cg)([(0,m.MZ)({attribute:!1})],q.prototype,"hass",void 0),(0,h.Cg)([(0,m.wk)()],q.prototype,"_config",void 0),q=(0,h.Cg)([(0,m.EM)("hui-energy-devices-card-editor")],q),a.d(t,{HuiEnergyDevicesCardEditor:function(){return q}}),i()}catch(z){i(z)}})},30013:function(e,t,a){var i=a(49588),n=(0,i.Ik)({type:(0,i.Yj)(),view_layout:(0,i.bz)(),layout_options:(0,i.bz)(),grid_options:(0,i.bz)(),visibility:(0,i.bz)(),disabled:(0,i.lq)((0,i.zM)())});a.d(t,{H:function(){return n}})}}]);
//# sourceMappingURL=20206.94fae6f01d2250f7.js.map