export const __rspack_esm_id="21614";export const __rspack_esm_ids=["21614"];export const __webpack_modules__={13469(e,r,o){o.a(e,async function(e,t){try{o.r(r),o.d(r,{HuiErrorHeadingBadge:()=>p,createErrorHeadingBadgeConfig:()=>l,createErrorHeadingBadgeElement:()=>d});var i=o(62826),n=o(53289),a=o(96196),s=o(97735),c=(o(24671),o(67094),o(33963)),g=e([c]);c=(g.then?(await g)():g)[0];const h="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",d=e=>{const r=document.createElement("hui-error-heading-badge");return r.setConfig(e),r},l=e=>({type:"error",error:e});class p extends a.WF{setConfig(e){this._config=e}_viewDetail(){let e;if(this._config.origConfig)try{e=(0,n.dump)(this._config.origConfig)}catch(r){e=`[Error dumping ${this._config.origConfig}]`}(0,c.showAlertDialog)(this,{title:this._config?.error,warning:!0,text:e?a.qy`<pre>${e}</pre>`:""})}render(){return this._config?a.qy` <ha-heading-badge class="error" @click="${this._viewDetail}" type="button" .title="${this._config.error}"> <ha-svg-icon slot="icon" .path="${h}"></ha-svg-icon> <span class="content">${this._config.error}</span> </ha-heading-badge> `:a.s6}}p.styles=a.AH`ha-heading-badge{--icon-color:var(--error-color);color:var(--error-color)}.content{max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pre{font-family:var(--ha-font-family-code);white-space:break-spaces;user-select:text}`,(0,i.Cg)([(0,s.wk)()],p.prototype,"_config",void 0),p=(0,i.Cg)([(0,s.EM)("hui-error-heading-badge")],p),t()}catch(e){t(e)}})}};
//# sourceMappingURL=21614.ba9b510e3ea2a099.js.map