"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["42577"],{92840:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HuiEnergyDateSelectionCardEditor:function(){return f}});i(62953);var n=i(40445),o=i(96196),c=i(77845),l=i(22786),r=i(63533),s=i(1087),u=i(52763),d=i(84698),h=e([u]);u=(h.then?(await h)():h)[0];let p,_=e=>e;const g=(0,r.kp)(d.H,(0,r.Ik)({disable_compare:(0,r.lq)((0,r.zM)()),collection_key:(0,r.lq)((0,r.Yj)()),vertical_opening_direction:(0,r.lq)((0,r.KC)([(0,r.eu)("auto"),(0,r.eu)("up"),(0,r.eu)("down")])),opening_direction:(0,r.lq)((0,r.KC)([(0,r.eu)("auto"),(0,r.eu)("right"),(0,r.eu)("left"),(0,r.eu)("center")]))})),m=["auto","up","down"],b=["auto","right","left","center"];class f extends o.WF{setConfig(e){(0,r.vA)(e,g),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e=Object.assign({},this._config),t=this._schema(this.hass.localize);return(0,o.qy)(p||(p=_` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" .computeHelper="${0}" @value-changed="${0}"></ha-form>`),this.hass,e,t,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}_valueChanged(e){(0,s.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,l.A)(e=>[{name:"",type:"grid",schema:[{name:"vertical_opening_direction",required:!1,selector:{select:{options:m.map(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.energy-date-selection.vertical_opening_directions.${t}`)}))}}},{name:"opening_direction",required:!1,selector:{select:{options:b.map(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.energy-date-selection.opening_directions.${t}`)}))}}},{name:"disable_compare",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"vertical_opening_direction":case"opening_direction":case"disable_compare":return this.hass.localize(`ui.panel.lovelace.editor.card.energy-date-selection.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,n.Cg)([(0,c.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,n.Cg)([(0,c.wk)()],f.prototype,"_config",void 0),f=(0,n.Cg)([(0,c.EM)("hui-energy-date-selection-card-editor")],f),a()}catch(p){a(p)}})},84698:function(e,t,i){i.d(t,{H:function(){return n}});var a=i(63533);const n=(0,a.Ik)({type:(0,a.Yj)(),view_layout:(0,a.bz)(),layout_options:(0,a.bz)(),grid_options:(0,a.bz)(),visibility:(0,a.bz)(),disabled:(0,a.lq)((0,a.zM)())})}}]);
//# sourceMappingURL=42577.59636e8fe4bbe7f4.js.map