import{j as t,r as e,k as o,l as i,m as r}from"./p-BxEPsDRj.js";import{n as s,c as n}from"./p-CrMmJdZ6.js";import{o as a}from"./p-zNe_7rLp.js";import"./p-WZF-tHaR.js";var d=t`
  :host {
    width: 100%;
  }

  :host([data-type='primary']) > button {
    background-color: ${({tokens:t})=>t.theme.backgroundPrimary};
  }

  :host([data-type='secondary']) > button {
    background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
  }

  button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: ${({spacing:t})=>t[3]};
    width: 100%;
    border-radius: ${({borderRadius:t})=>t[4]};
    transition:
      background-color ${({durations:t})=>t["lg"]}
        ${({easings:t})=>t["ease-out-power-2"]},
      scale ${({durations:t})=>t["lg"]} ${({easings:t})=>t["ease-out-power-2"]};
    will-change: background-color, scale;
  }

  wui-text {
    text-transform: capitalize;
  }

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

  @media (hover: hover) {
    :host([data-type='primary']) > button:hover:enabled {
      background-color: ${({tokens:t})=>t.theme.foregroundPrimary};
    }

    :host([data-type='secondary']) > button:hover:enabled {
      background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
    }
  }

  button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
`;var l=undefined&&undefined.__decorate||function(t,e,o,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,n;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)if(n=t[a])s=(r<3?n(s):r>3?n(e,o,s):n(e,o))||s;return r>3&&s&&Object.defineProperty(e,o,s),s};let u=class t extends i{constructor(){super(...arguments);this.type="primary";this.imageSrc="google";this.imageSize=undefined;this.loading=false;this.boxColor="foregroundPrimary";this.disabled=false;this.rightIcon=true;this.boxed=true;this.rounded=false;this.fullSize=false}render(){this.dataset["rounded"]=this.rounded?"true":"false";this.dataset["type"]=this.type;return r`
      <button
        ?disabled=${this.loading?true:Boolean(this.disabled)}
        data-loading=${this.loading}
        tabindex=${a(this.tabIdx)}
      >
        <wui-flex gap="2" alignItems="center">
          ${this.templateLeftIcon()}
          <wui-flex gap="1">
            <slot></slot>
          </wui-flex>
        </wui-flex>
        ${this.templateRightIcon()}
      </button>
    `}templateLeftIcon(){if(this.icon){return r`<wui-image
        icon=${this.icon}
        iconColor=${a(this.iconColor)}
        ?boxed=${this.boxed}
        ?rounded=${this.rounded}
        boxColor=${this.boxColor}
      ></wui-image>`}return r`<wui-image
      ?boxed=${this.boxed}
      ?rounded=${this.rounded}
      ?fullSize=${this.fullSize}
      size=${a(this.imageSize)}
      src=${this.imageSrc}
      boxColor=${this.boxColor}
    ></wui-image>`}templateRightIcon(){if(!this.rightIcon){return null}if(this.loading){return r`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`}return r`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`}};u.styles=[e,o,d];l([s()],u.prototype,"type",void 0);l([s()],u.prototype,"imageSrc",void 0);l([s()],u.prototype,"imageSize",void 0);l([s()],u.prototype,"icon",void 0);l([s()],u.prototype,"iconColor",void 0);l([s({type:Boolean})],u.prototype,"loading",void 0);l([s()],u.prototype,"tabIdx",void 0);l([s()],u.prototype,"boxColor",void 0);l([s({type:Boolean})],u.prototype,"disabled",void 0);l([s({type:Boolean})],u.prototype,"rightIcon",void 0);l([s({type:Boolean})],u.prototype,"boxed",void 0);l([s({type:Boolean})],u.prototype,"rounded",void 0);l([s({type:Boolean})],u.prototype,"fullSize",void 0);u=l([n("wui-list-item")],u);
//# sourceMappingURL=p-QEmqEl1n.js.map