export const __rspack_esm_id=38222;export const __rspack_esm_ids=[38222];export const __webpack_modules__={13239(e,t,i){var n=i(87160),a=i(81711),o=i(22678);const r=(e,t,i)=>{const n=t[e.entity_id];return n?s(n,i):(0,a.u)(e)},s=(e,t,i)=>{const r=e.name||("original_name"in e&&null!=e.original_name?String(e.original_name):void 0),s=e.device_id?t[e.device_id]:void 0;if(!s)return r||(i?(0,a.u)(i):void 0);const c=(0,n.xn)(s);return c!==r?c&&r&&(0,o.p)(r,c)||r:void 0};i.d(t,{},{aH:r,cx:s,es:(e,t,i)=>!r(e,t,i)})},3738(e,t,i){i(18111),i(81148),i(22489),i(61701),i(13579);if(66649!=i.j)var n=i(56050);var a=i(99517),o=i(269),r=i(87160),s=i(13239),c=i(7070);if(66649!=i.j)var l=i(81711);var h=i(15866);const d=(e,t,i,n,a,l)=>{const{device:d,area:u,floor:_}=(0,h.ln)(e,i,n,a,l);return t.map(t=>{switch(t.type){case"entity":return(0,s.aH)(e,i,n);case"device":return d?(0,r.xn)(d):void 0;case"area":return u?(0,o.A)(u):void 0;case"floor":return _?(0,c.X)(_):void 0;case"text":return t.text;default:return""}})};i.d(t,{},{Bj:(e,t)=>{const[i,n,o]=d(t,[{type:"entity"},{type:"device"},{type:"area"}],e.entities,e.devices,e.areas,e.floors),r=(0,a.qC)(e.language,e.translationMetadata.translations);return{primary:i||n||t.entity_id,secondary:[o,i?n:void 0].filter(Boolean).join(r?" ◂ ":" ▸ ")||void 0}},Cf:d,uU:(e,t,i,a,o,r,c)=>{if("string"==typeof t)return t;if(!t)return(0,l.u)(e);let h=(0,n.e)(t);const u=c?.separator??" ";if(h.every(e=>"text"===e.type))return h.map(e=>e.text).join(u);if((0,s.es)(e,i,a)){h.some(e=>"device"===e.type)||(h=h.map(e=>"entity"===e.type?{type:"device"}:e))}const _=d(e,h,i,a,o,r);return 1===_.length?_[0]||"":_.filter(e=>e).join(u)}})},7882(e,t,i){i.a(e,async function(e,n){try{i.r(t);var a=i(15697),o=i(57527),r=i(79224),s=i(49588),c=i(148),l=i(68867),h=(i(11457),i(80347)),d=i(57406),u=i(68930),_=i(13263),g=e([l,h,d]);[l,h,d]=g.then?(await g)():g;const f=["sensor"];class p extends o.WF{setConfig(e){(0,s.vA)(e,u.oe),this._config=e}get _entity(){return this._config.entity||""}get _detail(){return this._config.detail??1}get _hours_to_show(){return this._config.hours_to_show||24}render(){return this.hass&&this._config?o.qy` <div class="card-config"> <ha-entity-picker .label=${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} .value=${this._entity} .configValue=${"entity"} .includeDomains=${f} .required=${!0} @value-changed=${this._valueChanged}></ha-entity-picker> <div class="side-by-side"> <ha-formfield label=${this.hass.localize("ui.panel.lovelace.editor.card.sensor.show_more_detail")}> <ha-switch .checked=${2===this._detail} .configValue=${"detail"} @change=${this._change}></ha-switch> </ha-formfield> <ha-input type="number" .label="${this.hass.localize("ui.panel.lovelace.editor.card.generic.hours_to_show")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.optional")})" .value=${String(this._hours_to_show)} min="1" .configValue=${"hours_to_show"} @input=${this._valueChanged}></ha-input> </div> </div> `:o.s6}_change(e){if(!this._config||!this.hass)return;const t=e.target.checked?2:1;this._detail!==t&&(this._config={...this._config,detail:t},(0,c.r)(this,"config-changed",{config:this._config}))}_valueChanged(e){if(!this._config||!this.hass)return;const t=e.target;if(this[`_${t.configValue}`]!==t.value){if(t.configValue)if(""===t.value||"number"===t.type&&isNaN(Number(t.value)))this._config={...this._config},delete this._config[t.configValue];else{let e=t.value;"number"===t.type&&(e=Number(e)),this._config={...this._config,[t.configValue]:e}}(0,c.r)(this,"config-changed",{config:this._config})}}static get styles(){return[_.U,o.AH`.card-config ha-switch{margin:1px 0}`]}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],p.prototype,"_config",void 0),p=(0,a.Cg)([(0,r.EM)("hui-graph-footer-editor")],p),i.d(t,{HuiGraphFooterEditor:()=>p}),n()}catch(e){n(e)}})},75715(e,t,i){var n=i(49588),a=i(26041);const o=(0,n.Ik)({entity:(0,n.Yj)(),name:(0,n.lq)((0,n.Yj)()),icon:(0,n.lq)((0,n.Yj)()),image:(0,n.lq)((0,n.Yj)()),show_name:(0,n.lq)((0,n.zM)()),show_icon:(0,n.lq)((0,n.zM)()),tap_action:(0,n.lq)(a.kn),hold_action:(0,n.lq)(a.kn),double_tap_action:(0,n.lq)(a.kn)});i.d(t,{},{J:o})},68930(e,t,i){var n=i(49588),a=i(26041),o=i(75715);const r=(0,n.Ik)({type:(0,n.Yj)(),image:(0,n.Yj)(),tap_action:(0,n.lq)(a.kn),hold_action:(0,n.lq)(a.kn),double_tap_action:(0,n.lq)(a.kn),alt_text:(0,n.lq)((0,n.Yj)())}),s=(0,n.Ik)({type:(0,n.Yj)(),entities:(0,n.YO)(o.J)}),c=(0,n.Ik)({type:(0,n.Yj)(),entity:(0,n.Yj)(),detail:(0,n.lq)((0,n.ai)()),hours_to_show:(0,n.lq)((0,n.ai)())}),l=(0,n.OR)(e=>{if(e&&"object"==typeof e&&"type"in e)switch(e.type){case"buttons":return s;case"graph":return c;case"picture":return r}return(0,n.KC)([s,c,r])});i.d(t,{},{oe:c,zb:l})}};
//# sourceMappingURL=38222.38878d7573168446.js.map