"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["38260"],{50655:function(r,e,t){t.a(r,async function(r,o){try{t.r(e),t.d(e,{HuiErrorBadge:function(){return w},createErrorBadgeConfig:function(){return v},createErrorBadgeElement:function(){return p}});var i=t(40445),n=t(53289),a=t(96196),c=t(77845),s=(t(24671),t(67094),t(33963)),g=r([s]);s=(g.then?(await g)():g)[0];let h,l,f,d=r=>r;const u="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",p=r=>{const e=document.createElement("hui-error-badge");return e.setConfig(r),e},v=r=>({type:"error",error:r});class w extends a.WF{setConfig(r){this._config=r}_viewDetail(){var r;let e;if(this._config.origConfig)try{e=(0,n.dump)(this._config.origConfig)}catch(t){e=`[Error dumping ${this._config.origConfig}]`}(0,s.showAlertDialog)(this,{title:null===(r=this._config)||void 0===r?void 0:r.error,warning:!0,text:e?(0,a.qy)(h||(h=d`<pre>${0}</pre>`),e):""})}render(){return this._config?(0,a.qy)(l||(l=d` <ha-badge class="error" @click="${0}" type="button" label="Error"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> <div class="content">${0}</div> </ha-badge> `),this._viewDetail,u,this._config.error):a.s6}}w.styles=(0,a.AH)(f||(f=d`ha-badge{--badge-color:var(--error-color);--ha-card-border-color:var(--error-color)}.content{max-width:100px;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,c.wk)()],w.prototype,"_config",void 0),w=(0,i.Cg)([(0,c.EM)("hui-error-badge")],w),o()}catch(h){o(h)}})}}]);
//# sourceMappingURL=38260.d2a38576501feeaa.js.map