"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[50620],{80919:function(e,a,t){t.a(e,async function(e,n){try{t.r(a);var o,r=t(28430),i=t(97058),l=t(57567),c=t(25979),u=t(12463),s=t(16472),h=(t(28706),t(62062),t(26099),t(15697)),y=t(57527),p=t(51209),d=t(49588),_=t(90789),f=t(148),g=t(55682),k=t(30013),m=e([g]);g=(m.then?(await m)():m)[0];var v=(0,d.kp)(k.H,(0,d.Ik)({type:(0,d.KC)([(0,d.eu)("power-sankey"),(0,d.eu)("water-sankey"),(0,d.eu)("energy-sankey"),(0,d.eu)("water-flow-sankey")]),title:(0,d.lq)((0,d.Yj)()),collection_key:(0,d.lq)((0,d.Yj)()),layout:(0,d.lq)((0,d.KC)([(0,d.eu)("auto"),(0,d.eu)("vertical"),(0,d.eu)("horizontal")])),group_by_floor:(0,d.lq)((0,d.zM)()),group_by_area:(0,d.lq)((0,d.zM)())})),b=["auto","vertical","horizontal"],C=function(e){function a(){var e;(0,l.A)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=(0,s.A)(this,a,[].concat(n)))._schema=(0,_.A)(function(e){return[{name:"title",selector:{text:{}}},{name:"",type:"grid",schema:[{name:"layout",required:!1,selector:{select:{options:b.map(function(a){return{value:a,label:e("ui.panel.lovelace.editor.card.energy-sankey.layout_directions.".concat(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}]}]}),e._computeHelperCallback=function(a){if("collection_key"===a.name)return e.hass.localize("ui.panel.lovelace.editor.card.generic.collection_key_description")},e._computeLabelCallback=function(a){switch(a.name){case"layout":case"group_by_floor":case"group_by_area":return e.hass.localize("ui.panel.lovelace.editor.card.energy-sankey.".concat(a.name));default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(a.name))}},e}return(0,u.A)(a,e),(0,c.A)(a,[{key:"setConfig",value:function(e){(0,d.vA)(e,v),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return y.s6;var e=this._schema(this.hass.localize),a=(0,i.A)({},this._config);return(0,y.qy)(o||(o=(0,r.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," .computeHelper="," @value-changed=","></ha-form>"])),this.hass,a,e,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}},{key:"_valueChanged",value:function(e){(0,f.r)(this,"config-changed",{config:e.detail.value})}}])}(y.WF);(0,h.Cg)([(0,p.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,h.Cg)([(0,p.wk)()],C.prototype,"_config",void 0),C=(0,h.Cg)([(0,p.EM)("hui-energy-sankey-card-editor")],C),t.d(a,{HuiEnergySankeyCardEditor:function(){return C}}),n()}catch(z){n(z)}})},30013:function(e,a,t){var n=t(49588),o=(0,n.Ik)({type:(0,n.Yj)(),view_layout:(0,n.bz)(),layout_options:(0,n.bz)(),grid_options:(0,n.bz)(),visibility:(0,n.bz)(),disabled:(0,n.lq)((0,n.zM)())});t.d(a,{H:function(){return o}})}}]);
//# sourceMappingURL=50620.679f1e26c4a21376.js.map