export const __rspack_esm_id="88646";export const __rspack_esm_ids=["88646"];export const __webpack_modules__={83845(t,a,e){e.a(t,async function(t,s){try{e.r(a);e(18111),e(22489),e(61701),e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698);var i=e(62826),o=e(96196),r=e(97735),n=e(22786),d=e(53610),l=e(80785),c=e(95747),h=(e(44328),e(76776),e(88827)),p=e(10763),u=t([p,c,d,h]);[p,c,d,h]=u.then?(await u)():u;class v extends o.WF{willUpdate(t){super.willUpdate(t),(t.has("params")||t.has("hass"))&&this.params?.entityId&&this.hass&&(this._stateObj=this.hass.states[this.params.entityId])}render(){if(!this.params||!this._stateObj)return o.s6;const{stateEntries:t,attributes:a,yamlData:e}=this._getDetailData(this._stateObj);return o.qy` <div class="content"> ${this.yamlMode?o.qy`<ha-yaml-editor .hass="${this.hass}" .value="${e}" read-only auto-update in-dialog></ha-yaml-editor>`:o.qy` <section class="section"> <h2 class="section-title"> ${this.hass.localize("ui.components.entity.entity-state-picker.state")} </h2> <ha-card> <div class="card-content"> <div class="data-group"> ${t.map(t=>o.qy`<div class="data-entry"> <div class="key"> ${this.hass.localize(t.translationKey)} </div> <div class="value">${t.value}</div> </div>`)} </div> </div> </ha-card> </section> <section class="section"> <h2 class="section-title"> ${this.hass.localize("ui.dialogs.more_info_control.attributes")} </h2> <ha-card> <div class="card-content"> <div class="data-group"> ${this._renderAttributes(a)} </div> </div> </ha-card> </section> `} </div> `}_formatTimestamp(t){const a=new Date(t);return(0,l.A)(a)?(0,c.yg)(a,this.hass.locale,this.hass.config):t}_renderAttributes(t){return 0===t.length?o.qy`<div class="empty"> ${this.hass.localize("ui.common.none")} </div>`:t.map(t=>o.qy` <div class="data-entry"> <div class="key"> ${(0,d.computeAttributeNameDisplay)(this.hass.localize,this._stateObj,this.hass.entities,t)} </div> <div class="value"> <ha-attribute-value .hass="${this.hass}" .attribute="${t}" .stateObj="${this._stateObj}"></ha-attribute-value> </div> </div> `)}constructor(...t){super(...t),this.yamlMode=!1,this._getDetailData=(0,n.A)(t=>{const a=this.hass.formatEntityState(t),e=(0,h.QG)(t),s=new Set(e),i=Object.keys(t.attributes).filter(t=>!s.has(t));return{stateEntries:[{translationKey:"ui.dialogs.more_info_control.translated",value:a},{translationKey:"ui.dialogs.more_info_control.raw",value:t.state},{translationKey:"ui.dialogs.more_info_control.last_changed",value:this._formatTimestamp(t.last_changed)},{translationKey:"ui.dialogs.more_info_control.last_updated",value:this._formatTimestamp(t.last_updated)}],attributes:[...e,...i],yamlData:{state:{translated:a,raw:t.state,last_changed:t.last_changed,last_updated:t.last_updated},attributes:t.attributes}}})}}v.styles=o.AH`:host{display:flex;flex-direction:column;flex:1}.content{padding:var(--ha-space-6);padding-bottom:max(var(--safe-area-inset-bottom),var(--ha-space-6))}.section+.section{margin-top:var(--ha-space-4)}.section-title{margin:0 0 var(--ha-space-2);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-medium)}ha-card{direction:ltr}.card-content{padding:var(--ha-space-2) var(--ha-space-4)}.data-entry{display:flex;flex-direction:row;justify-content:space-between;padding:var(--ha-space-2) 0;border-bottom:1px solid var(--divider-color)}.data-group .data-entry:last-of-type{border-bottom:none}.data-entry .value{max-width:60%;overflow-wrap:break-word;text-align:right}.key{flex-grow:1;color:var(--secondary-text-color)}.empty{color:var(--secondary-text-color);text-align:center;padding:var(--ha-space-2) 0}`,(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"entry",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"params",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"yamlMode",void 0),(0,i.Cg)([(0,r.wk)()],v.prototype,"_stateObj",void 0),v=(0,i.Cg)([(0,r.EM)("ha-more-info-details")],v),s()}catch(t){s(t)}})}};
//# sourceMappingURL=88646.7d786d73a4d13973.js.map