export const __rspack_esm_id=50620;export const __rspack_esm_ids=[50620];export const __webpack_modules__={80919(e,a,t){t.a(e,async function(e,o){try{t.r(a);var r=t(15697),i=t(57527),l=t(79224),s=t(49588),c=t(90789),n=t(148),u=t(55682),_=t(30013),h=e([u]);u=(h.then?(await h)():h)[0];const p=(0,s.kp)(_.H,(0,s.Ik)({type:(0,s.KC)([(0,s.eu)("power-sankey"),(0,s.eu)("water-sankey"),(0,s.eu)("energy-sankey"),(0,s.eu)("water-flow-sankey")]),title:(0,s.lq)((0,s.Yj)()),collection_key:(0,s.lq)((0,s.Yj)()),layout:(0,s.lq)((0,s.KC)([(0,s.eu)("auto"),(0,s.eu)("vertical"),(0,s.eu)("horizontal")])),group_by_floor:(0,s.lq)((0,s.zM)()),group_by_area:(0,s.lq)((0,s.zM)())})),y=["auto","vertical","horizontal"];class d extends i.WF{setConfig(e){(0,s.vA)(e,p),this._config=e}render(){if(!this.hass||!this._config)return i.s6;const e=this._schema(this.hass.localize),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,n.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,c.A)(e=>[{name:"title",selector:{text:{}}},{name:"",type:"grid",schema:[{name:"layout",required:!1,selector:{select:{options:y.map(a=>({value:a,label:e(`ui.panel.lovelace.editor.card.energy-sankey.layout_directions.${a}`)}))}}},{name:"",type:"grid",schema:[{name:"group_by_floor",required:!1,selector:{boolean:{}}},{name:"group_by_area",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"layout":case"group_by_floor":case"group_by_area":return this.hass.localize(`ui.panel.lovelace.editor.card.energy-sankey.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,r.Cg)([(0,l.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,r.Cg)([(0,l.wk)()],d.prototype,"_config",void 0),d=(0,r.Cg)([(0,l.EM)("hui-energy-sankey-card-editor")],d),t.d(a,{HuiEnergySankeyCardEditor:()=>d}),o()}catch(e){o(e)}})},30013(e,a,t){var o=t(49588);const r=(0,o.Ik)({type:(0,o.Yj)(),view_layout:(0,o.bz)(),layout_options:(0,o.bz)(),grid_options:(0,o.bz)(),visibility:(0,o.bz)(),disabled:(0,o.lq)((0,o.zM)())});t.d(a,{},{H:r})}};
//# sourceMappingURL=50620.f885e1339fb4a0c9.js.map