export const __rspack_esm_id=20206;export const __rspack_esm_ids=[20206];export const __webpack_modules__={95773(e,a,t){t.a(e,async function(e,i){try{t.r(a);var s=t(15697),o=t(57527),c=t(79224),r=t(49588),l=t(90789),n=t(148),d=t(55682),h=t(30013),p=e([d]);d=(p.then?(await p)():p)[0];const _=(0,r.kp)(h.H,(0,r.Ik)({type:(0,r.KC)([(0,r.eu)("energy-devices-graph"),(0,r.eu)("energy-devices-detail-graph")]),title:(0,r.lq)((0,r.Yj)()),collection_key:(0,r.lq)((0,r.Yj)()),max_devices:(0,r.lq)((0,r.ai)()),modes:(0,r.lq)((0,r.YO)((0,r.KC)([(0,r.eu)("bar"),(0,r.eu)("pie")]))),hide_compound_stats:(0,r.lq)((0,r.zM)())})),u=["bar","pie"];class m extends o.WF{setConfig(e){(0,r.vA)(e,_),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e=this._schema(this.hass.localize,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,n.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,l.A)((e,a)=>[{name:"title",selector:{text:{}}},{name:"",type:"grid",schema:[..."energy-devices-graph"===a?[{name:"modes",required:!1,selector:{select:{multiple:!0,mode:"list",options:u.map(a=>({value:a,label:e(`ui.panel.lovelace.editor.card.energy-devices-graph.mode_options.${a}`)}))}}},{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}]}]),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"modes":case"max_devices":case"hide_compound_stats":return this.hass.localize(`ui.panel.lovelace.editor.card.energy-devices-graph.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,s.Cg)([(0,c.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,s.Cg)([(0,c.wk)()],m.prototype,"_config",void 0),m=(0,s.Cg)([(0,c.EM)("hui-energy-devices-card-editor")],m),t.d(a,{HuiEnergyDevicesCardEditor:()=>m}),i()}catch(e){i(e)}})},30013(e,a,t){var i=t(49588);const s=(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)())});t.d(a,{},{H:s})}};
//# sourceMappingURL=20206.bc8ef2e6f1b3f7d2.js.map