"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[87130],{25121:function(e,t,a){a.a(e,async function(e,n){try{a.r(t);var i,o=a(28430),r=a(97058),l=a(57567),s=a(25979),c=a(12463),u=a(16472),h=(a(28706),a(62062),a(26099),a(15697)),m=a(57527),d=a(51209),p=a(90789),f=a(49588),_=a(148),g=a(55682),v=a(51360),y=a(30013),b=a(24652),k=a(13263),q=e([g,v]);[g,v]=q.then?(await q)():q;var z=(0,f.kp)(y.H,(0,f.Ik)({entity:(0,f.lq)((0,f.Yj)()),name:(0,f.lq)(b.q),icon:(0,f.lq)((0,f.Yj)()),graph:(0,f.lq)((0,f.KC)([(0,f.eu)("line"),(0,f.eu)("none")])),unit:(0,f.lq)((0,f.Yj)()),detail:(0,f.lq)((0,f.ai)()),theme:(0,f.lq)((0,f.Yj)()),hours_to_show:(0,f.lq)((0,f.ai)()),limits:(0,f.lq)((0,f.Ik)({min:(0,f.lq)((0,f.ai)()),max:(0,f.lq)((0,f.ai)())}))})),C=function(e){function t(){var e;(0,l.A)(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(n)))._schema=(0,p.A)(function(e){return[{name:"entity",selector:{entity:{domain:["counter","input_number","number","sensor"]}}},{name:"name",selector:{entity_name:{}},context:{entity:"entity"}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"graph",selector:{select:{options:["none","line"].map(function(t){return{value:t,label:e("ui.panel.lovelace.editor.card.sensor.graph_options.".concat(t))}})}}},{name:"unit",selector:{text:{}}},{name:"detail",selector:{boolean:{}}},{name:"theme",selector:{theme:{}}},{name:"hours_to_show",default:v.S,selector:{number:{min:1,mode:"box"}}}]},{type:"grid",name:"limits",schema:[{name:"min",selector:{number:{mode:"box"}}},{name:"max",selector:{number:{mode:"box"}}}]}]}),e._computeLabelCallback=function(t){switch(t.name){case"theme":return"".concat(e.hass.localize("ui.panel.lovelace.editor.card.generic.theme")," (").concat(e.hass.localize("ui.panel.lovelace.editor.card.config.optional"),")");case"detail":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.show_more_detail");case"graph":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.graph_type");case"min":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_min");case"max":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_max");default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"setConfig",value:function(e){(0,f.vA)(e,z),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return m.s6;var e=(0,r.A)((0,r.A)({graph:"none"},this._config),{},{detail:2===this._config.detail});return(0,m.qy)(i||(i=(0,o.A)([" <ha-form .hass="," .data="," .schema="," .computeLabel="," @value-changed=","></ha-form> "])),this.hass,e,this._schema(this.hass.localize),this._computeLabelCallback,this._valueChanged)}},{key:"_valueChanged",value:function(e){var t=e.detail.value;t.detail=t.detail?2:1,(0,_.r)(this,"config-changed",{config:t})}}],[{key:"styles",get:function(){return k.U}}])}(m.WF);(0,h.Cg)([(0,d.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,h.Cg)([(0,d.wk)()],C.prototype,"_config",void 0),C=(0,h.Cg)([(0,d.EM)("hui-sensor-card-editor")],C),a.d(t,{HuiSensorCardEditor:function(){return C}}),n()}catch(x){n(x)}})},30013:function(e,t,a){var n=a(49588),i=(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)())});a.d(t,{H:function(){return i}})}}]);
//# sourceMappingURL=87130.64ff21b66e15101e.js.map