export const __rspack_esm_id="92923";export const __rspack_esm_ids=["92923"];export const __webpack_modules__={46358(e,a,t){t.a(e,async function(e,o){try{t.r(a),t.d(a,{HuiEnergySankeyCardEditor:()=>d});var r=t(62826),i=t(96196),l=t(97735),s=t(63533),c=t(22786),n=t(1087),u=t(52763),_=t(84698),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),o()}catch(e){o(e)}})},84698(e,a,t){t.d(a,{H:()=>r});var o=t(63533);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)())})}};
//# sourceMappingURL=92923.54a233f40fffd285.js.map