import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{er as t}from"./control-ui-foundation-CeFMP1Ly.js";import{dl as n,ml as r}from"./control-ui-core-pH6nakZ-.js";import{G as i,J as a,W as o,Z as s,at as c,rt as l}from"./lit-runtime-BEtFSUCp.js";import{Dc as u,Oc as d}from"./control-ui-boot-Cdpgu1Gm.js";var f;function p(){return(p=e((()=>{o(),s(),d(),r(),f=class extends n{constructor(...e){super(...e),this.routeUrl=null,this.authTokens=[],this.authReady=!1,this.fallback=i,this.undecodableRouteUrl=null,this.loader=new u(()=>{this.isConnected&&this.requestUpdate()},{cacheNotFound:!0})}disconnectedCallback(){this.loader.reset(),super.disconnectedCallback()}render(){return this.loader.withActiveRoutes(()=>this.renderContent())}renderContent(){let e=this.routeUrl,t=e&&this.authReady&&this.undecodableRouteUrl!==e?this.loader.resolve(e,this.authTokens):null;return t?a`<img
      class="channel-avatar"
      src=${t}
      alt=""
      aria-hidden="true"
      decoding="async"
      @error=${()=>{this.undecodableRouteUrl=e}}
    />`:this.fallback}},t([c({attribute:!1})],f.prototype,`routeUrl`,void 0),t([c({attribute:!1})],f.prototype,`authTokens`,void 0),t([c({attribute:!1})],f.prototype,`authReady`,void 0),t([c({attribute:!1})],f.prototype,`fallback`,void 0),t([l()],f.prototype,`undecodableRouteUrl`,void 0),customElements.get(`openclaw-channel-avatar`)||customElements.define(`openclaw-channel-avatar`,f)})))()}p();
//# sourceMappingURL=channel-avatar-CNP_6012.js.map