export const __rspack_esm_id="79062";export const __rspack_esm_ids=["79062"];export const __webpack_modules__={54197(e,a,r){r.a(e,async function(e,t){try{r.r(a),r.d(a,{HuiEnergyGraphCardEditor:()=>p});var o=r(62826),i=r(96196),s=r(97735),n=r(63533),c=r(22786),l=r(1087),u=r(52763),g=r(84698),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-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 i.WF{setConfig(e){(0,n.vA)(e,d),this._config=e}render(){if(!this.hass||!this._config)return i.s6;const e=this._schema(this._config.type),a={...this._config};return i.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?[{name:"show_legend",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,o.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_config",void 0),p=(0,o.Cg)([(0,s.EM)("hui-energy-graph-card-editor")],p),t()}catch(e){t(e)}})},84698(e,a,r){r.d(a,{H:()=>o});var t=r(63533);const o=(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)())})}};
//# sourceMappingURL=79062.fe628786d430bdc4.js.map