export const __rspack_esm_id="82699";export const __rspack_esm_ids=["82699"];export const __webpack_modules__={28326(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HuiSensorCardEditor:()=>b});var s=a(62826),o=a(96196),n=a(97735),l=a(22786),r=a(63533),c=a(1087),h=a(52763),m=a(203),d=a(84698),u=a(44155),p=a(7382),_=e([h,m]);[h,m]=_.then?(await _)():_;const g=(0,r.kp)(d.H,(0,r.Ik)({entity:(0,r.lq)((0,r.Yj)()),name:(0,r.lq)(u.q),icon:(0,r.lq)((0,r.Yj)()),graph:(0,r.lq)((0,r.KC)([(0,r.eu)("line"),(0,r.eu)("none")])),unit:(0,r.lq)((0,r.Yj)()),detail:(0,r.lq)((0,r.ai)()),theme:(0,r.lq)((0,r.Yj)()),hours_to_show:(0,r.lq)((0,r.ai)()),limits:(0,r.lq)((0,r.Ik)({min:(0,r.lq)((0,r.ai)()),max:(0,r.lq)((0,r.ai)())}))}));class b extends o.WF{setConfig(e){(0,r.vA)(e,g),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e={graph:"none",...this._config,detail:2===this._config.detail};return o.qy` <ha-form .hass="${this.hass}" .data="${e}" .schema="${this._schema(this.hass.localize)}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}_valueChanged(e){const t=e.detail.value;t.detail=t.detail?2:1,(0,c.r)(this,"config-changed",{config:t})}static get styles(){return p.U}constructor(...e){super(...e),this._schema=(0,l.A)(e=>[{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(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.sensor.graph_options.${t}`)}))}}},{name:"unit",selector:{text:{}}},{name:"detail",selector:{boolean:{}}},{name:"theme",selector:{theme:{}}},{name:"hours_to_show",default:m.S,selector:{number:{min:1,mode:"box"}}}]},{type:"grid",name:"limits",schema:[{name:"min",selector:{number:{mode:"box"}}},{name:"max",selector:{number:{mode:"box"}}}]}]),this._computeLabelCallback=e=>{switch(e.name){case"theme":return`${this.hass.localize("ui.panel.lovelace.editor.card.generic.theme")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.optional")})`;case"detail":return this.hass.localize("ui.panel.lovelace.editor.card.sensor.show_more_detail");case"graph":return this.hass.localize("ui.panel.lovelace.editor.card.sensor.graph_type");case"min":return this.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_min");case"max":return this.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_max");default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,s.Cg)([(0,n.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,s.Cg)([(0,n.wk)()],b.prototype,"_config",void 0),b=(0,s.Cg)([(0,n.EM)("hui-sensor-card-editor")],b),i()}catch(e){i(e)}})},84698(e,t,a){a.d(t,{H:()=>s});var i=a(63533);const s=(0,i.Ik)({type:(0,i.Yj)(),view_layout:(0,i.bz)(),layout_options:(0,i.bz)(),grid_options:(0,i.bz)(),visibility:(0,i.bz)(),disabled:(0,i.lq)((0,i.zM)())})}};
//# sourceMappingURL=82699.bb3be424a3edf0d1.js.map