import{X as t,j as i,r as e,l as o,m as s,k as a}from"./p-BxEPsDRj.js";import{n as r,c as n,U as l}from"./p-CrMmJdZ6.js";import"./p-CbOrugAV.js";import"./p-DJATscC5.js";import{o as c}from"./p-zNe_7rLp.js";const d=t`<svg width="86" height="96" fill="none">
  <path
    d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
  />
</svg>`;const h=t`<svg  viewBox="0 0 48 54" fill="none">
  <path
    d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
  />
</svg>`;const u=t`
  <svg fill="none" viewBox="0 0 36 40">
    <path
      d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z"
    />
  </svg>
`;var p=i`
  :host {
    position: relative;
    border-radius: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--local-width);
    height: var(--local-height);
  }

  :host([data-round='true']) {
    background: ${({tokens:t})=>t.theme.foregroundPrimary};
    border-radius: 100%;
    outline: 1px solid ${({tokens:t})=>t.core.glass010};
  }

  svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  svg > path {
    stroke: var(--local-stroke);
  }

  wui-image {
    width: 100%;
    height: 100%;
    -webkit-clip-path: var(--local-path);
    clip-path: var(--local-path);
    background: ${({tokens:t})=>t.theme.foregroundPrimary};
  }

  wui-icon {
    transform: translateY(-5%);
    width: var(--local-icon-size);
    height: var(--local-icon-size);
  }
`;var f=undefined&&undefined.__decorate||function(t,i,e,o){var s=arguments.length,a=s<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,e):o,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,i,e,o);else for(var n=t.length-1;n>=0;n--)if(r=t[n])a=(s<3?r(a):s>3?r(i,e,a):r(i,e))||a;return s>3&&a&&Object.defineProperty(i,e,a),a};let g=class t extends o{constructor(){super(...arguments);this.size="md";this.name="uknown";this.networkImagesBySize={sm:u,md:h,lg:d};this.selected=false;this.round=false}render(){const t={sm:"4",md:"6",lg:"10"};if(this.round){this.dataset["round"]="true";this.style.cssText=`\n      --local-width: var(--apkt-spacing-10);\n      --local-height: var(--apkt-spacing-10);\n      --local-icon-size: var(--apkt-spacing-4);\n    `}else{this.style.cssText=`\n\n      --local-path: var(--apkt-path-network-${this.size});\n      --local-width:  var(--apkt-width-network-${this.size});\n      --local-height:  var(--apkt-height-network-${this.size});\n      --local-icon-size:  var(--apkt-spacing-${t[this.size]});\n    `}return s`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){if(this.round){return null}return this.networkImagesBySize[this.size]}templateVisual(){if(this.imageSrc){return s`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`}return s`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`}};g.styles=[e,p];f([r()],g.prototype,"size",void 0);f([r()],g.prototype,"name",void 0);f([r({type:Object})],g.prototype,"networkImagesBySize",void 0);f([r()],g.prototype,"imageSrc",void 0);f([r({type:Boolean})],g.prototype,"selected",void 0);f([r({type:Boolean})],g.prototype,"round",void 0);g=f([n("wui-network-image")],g);var v=i`
  :host {
    position: relative;
    background-color: ${({tokens:t})=>t.theme.foregroundTertiary};
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: inherit;
    border-radius: var(--local-border-radius);
  }

  :host([data-image='true']) {
    background-color: transparent;
  }

  :host > wui-flex {
    overflow: hidden;
    border-radius: inherit;
    border-radius: var(--local-border-radius);
  }

  :host([data-size='sm']) {
    width: 32px;
    height: 32px;
  }

  :host([data-size='md']) {
    width: 40px;
    height: 40px;
  }

  :host([data-size='lg']) {
    width: 56px;
    height: 56px;
  }

  :host([name='Extension'])::after {
    border: 1px solid ${({colors:t})=>t.accent010};
  }

  :host([data-wallet-icon='allWallets'])::after {
    border: 1px solid ${({colors:t})=>t.accent010};
  }

  wui-icon[data-parent-size='inherit'] {
    width: 75%;
    height: 75%;
    align-items: center;
  }

  wui-icon {
    color: ${({tokens:t})=>t.theme.iconDefault};
  }

  wui-icon[data-parent-size='sm'] {
    width: 24px;
    height: 24px;
  }

  wui-icon[data-parent-size='md'] {
    width: 32px;
    height: 32px;
  }

  :host > wui-icon-box {
    position: absolute;
    overflow: hidden;
    right: -1px;
    bottom: -2px;
    z-index: 1;
    border: 2px solid ${({tokens:t})=>t.theme.backgroundPrimary};
    padding: 1px;
  }
`;var w=undefined&&undefined.__decorate||function(t,i,e,o){var s=arguments.length,a=s<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,e):o,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,i,e,o);else for(var n=t.length-1;n>=0;n--)if(r=t[n])a=(s<3?r(a):s>3?r(i,e,a):r(i,e))||a;return s>3&&a&&Object.defineProperty(i,e,a),a};let m=class t extends o{constructor(){super(...arguments);this.size="md";this.name="";this.installed=false;this.badgeSize="xs"}render(){let t="1";if(this.size==="lg"){t="4"}else if(this.size==="md"){t="2"}else if(this.size==="sm"){t="1"}this.style.cssText=`\n       --local-border-radius: var(--apkt-borderRadius-${t});\n   `;this.dataset["size"]=this.size;if(this.imageSrc){this.dataset["image"]="true"}if(this.walletIcon){this.dataset["walletIcon"]=this.walletIcon}return s`
      <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
    `}templateVisual(){if(this.imageSrc){return s`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`}else if(this.walletIcon){return s`<wui-icon size="md" color="default" name=${this.walletIcon}></wui-icon>`}return s`<wui-icon
      data-parent-size=${this.size}
      size="inherit"
      color="inherit"
      name="wallet"
    ></wui-icon>`}};m.styles=[e,v];w([r()],m.prototype,"size",void 0);w([r()],m.prototype,"name",void 0);w([r()],m.prototype,"imageSrc",void 0);w([r()],m.prototype,"walletIcon",void 0);w([r({type:Boolean})],m.prototype,"installed",void 0);w([r()],m.prototype,"badgeSize",void 0);m=w([n("wui-wallet-image")],m);var b=i`
  button {
    display: flex;
    align-items: center;
    height: 40px;
    padding: ${({spacing:t})=>t[2]};
    border-radius: ${({borderRadius:t})=>t[4]};
    column-gap: ${({spacing:t})=>t[1]};
    background-color: transparent;
    transition: background-color ${({durations:t})=>t["lg"]}
      ${({easings:t})=>t["ease-out-power-2"]};
    will-change: background-color;
  }

  wui-image,
  .icon-box {
    width: ${({spacing:t})=>t[6]};
    height: ${({spacing:t})=>t[6]};
    border-radius: ${({borderRadius:t})=>t[4]};
  }

  wui-text {
    flex: 1;
  }

  .icon-box {
    position: relative;
  }

  .icon-box[data-active='true'] {
    background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
  }

  .circle {
    position: absolute;
    left: 16px;
    top: 15px;
    width: 8px;
    height: 8px;
    background-color: ${({tokens:t})=>t.core.textSuccess};
    box-shadow: 0 0 0 2px ${({tokens:t})=>t.theme.foregroundPrimary};
    border-radius: 50%;
  }

  /* -- Hover & Active states ----------------------------------------------------------- */
  @media (hover: hover) {
    button:hover:enabled,
    button:active:enabled {
      background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
    }
  }
`;var x=undefined&&undefined.__decorate||function(t,i,e,o){var s=arguments.length,a=s<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,e):o,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(t,i,e,o);else for(var n=t.length-1;n>=0;n--)if(r=t[n])a=(s<3?r(a):s>3?r(i,e,a):r(i,e))||a;return s>3&&a&&Object.defineProperty(i,e,a),a};let $=class t extends o{constructor(){super(...arguments);this.address="";this.profileName="";this.alt="";this.imageSrc="";this.icon=undefined;this.iconSize="md";this.enableGreenCircle=true;this.loading=false;this.charsStart=4;this.charsEnd=6}render(){return s`
      <button>
        ${this.leftImageTemplate()} ${this.textTemplate()} ${this.rightImageTemplate()}
      </button>
    `}leftImageTemplate(){const t=this.icon?s`<wui-icon
          size=${c(this.iconSize)}
          color="default"
          name=${this.icon}
          class="icon"
        ></wui-icon>`:s`<wui-image src=${this.imageSrc} alt=${this.alt}></wui-image>`;return s`
      <wui-flex
        alignItems="center"
        justifyContent="center"
        class="icon-box"
        data-active=${Boolean(this.icon)}
      >
        ${t}
        ${this.enableGreenCircle?s`<wui-flex class="circle"></wui-flex>`:null}
      </wui-flex>
    `}textTemplate(){return s`
      <wui-text variant="lg-regular" color="primary">
        ${l.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})}
      </wui-text>
    `}rightImageTemplate(){return s`<wui-icon name="chevronBottom" size="sm" color="default"></wui-icon>`}};$.styles=[e,a,b];x([r()],$.prototype,"address",void 0);x([r()],$.prototype,"profileName",void 0);x([r()],$.prototype,"alt",void 0);x([r()],$.prototype,"imageSrc",void 0);x([r()],$.prototype,"icon",void 0);x([r()],$.prototype,"iconSize",void 0);x([r({type:Boolean})],$.prototype,"enableGreenCircle",void 0);x([r({type:Boolean})],$.prototype,"loading",void 0);x([r({type:Number})],$.prototype,"charsStart",void 0);x([r({type:Number})],$.prototype,"charsEnd",void 0);$=x([n("wui-wallet-switch")],$);export{h as n};
//# sourceMappingURL=p-4_J16YIF.js.map