import{r as i,B as t,h as r}from"./p-03169580.js";const o="fireenjin-avatar{position:relative}fireenjin-avatar .avatar-image{display:block;border-radius:4px;border:1px solid var(--ion-color-light-shade);background-color:var(--ion-color-light);background-size:cover;background-position:center;font-weight:bolder;text-align:center;color:var(--ion-color-medium);text-decoration:none;margin:auto !important}";let a=class{constructor(t){i(this,t)}getCssVarColor(i){if(!(t===null||t===void 0?void 0:t.isBrowser))return i;return getComputedStyle(document.documentElement).getPropertyValue(`--ion-color-${i}`).replace(" ","")}render(){var i,t,o;return r("div",{class:"avatar-image",style:{background:this.color,backgroundImage:!((i=this.src)===null||i===void 0?void 0:i.length)&&this.initials?`url('https://avatars.dicebear.com/api/initials/${this.initials}.svg${this.color&&(this.color.includes("#")||this.color.includes("rgb(")||this.color.includes("rgba(")||this.color.includes("hsl(")||this.color.includes("hsla("))?`?b=${this.color.replace("#","%23")}`:this.color?`?b=${this.getCssVarColor(this.color).replace("#","%23")}`:""}')`:`url('${((t=this.src)===null||t===void 0?void 0:t.length)?this.src:((o=this.fallback)===null||o===void 0?void 0:o.length)?this.fallback:"/assets/images/default-icon.png"}')`,height:this.size?this.size:"50px",width:this.size?this.size:"50px"}})}};a.style=o;export{a as fireenjin_avatar};
//# sourceMappingURL=p-5942ed70.entry.js.map