import{j as a,r as l,l as r,m as e}from"./p-BxEPsDRj.js";import{n as i,c as o,U as t}from"./p-CrMmJdZ6.js";import"./p-CbOrugAV.js";var c=a`
  :host {
    display: block;
    width: var(--local-width);
    height: var(--local-height);
    border-radius: ${({borderRadius:a})=>a[16]};
    overflow: hidden;
    position: relative;
  }

  :host([data-variant='generated']) {
    --mixed-local-color-1: var(--local-color-1);
    --mixed-local-color-2: var(--local-color-2);
    --mixed-local-color-3: var(--local-color-3);
    --mixed-local-color-4: var(--local-color-4);
    --mixed-local-color-5: var(--local-color-5);
  }

  :host([data-variant='generated']) {
    background: radial-gradient(
      var(--local-radial-circle),
      #fff 0.52%,
      var(--mixed-local-color-5) 31.25%,
      var(--mixed-local-color-3) 51.56%,
      var(--mixed-local-color-2) 65.63%,
      var(--mixed-local-color-1) 82.29%,
      var(--mixed-local-color-4) 100%
    );
  }

  :host([data-variant='default']) {
    background: radial-gradient(
      75.29% 75.29% at 64.96% 24.36%,
      #fff 0.52%,
      #f5ccfc 31.25%,
      #dba4f5 51.56%,
      #9a8ee8 65.63%,
      #6493da 82.29%,
      #6ebdea 100%
    );
  }
`;var d=undefined&&undefined.__decorate||function(a,l,r,e){var i=arguments.length,o=i<3?l:e===null?e=Object.getOwnPropertyDescriptor(l,r):e,t;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(a,l,r,e);else for(var c=a.length-1;c>=0;c--)if(t=a[c])o=(i<3?t(o):i>3?t(l,r,o):t(l,r))||o;return i>3&&o&&Object.defineProperty(l,r,o),o};let s=class a extends r{constructor(){super(...arguments);this.imageSrc=undefined;this.alt=undefined;this.address=undefined;this.size="xl"}render(){const a={inherit:"inherit",xxs:"3",xs:"5",sm:"6",md:"8",mdl:"8",lg:"10",xl:"16",xxl:"20"};this.style.cssText=`\n    --local-width: var(--apkt-spacing-${a[this.size??"xl"]});\n    --local-height: var(--apkt-spacing-${a[this.size??"xl"]});\n    `;return e`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc){this.dataset["variant"]="image";return e`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`}else if(this.address){this.dataset["variant"]="generated";const a=t.generateAvatarColors(this.address);this.style.cssText+=`\n ${a}`;return null}this.dataset["variant"]="default";return null}};s.styles=[l,c];d([i()],s.prototype,"imageSrc",void 0);d([i()],s.prototype,"alt",void 0);d([i()],s.prototype,"address",void 0);d([i()],s.prototype,"size",void 0);s=d([o("wui-avatar")],s);
//# sourceMappingURL=p-bVKFXN0v.js.map