import{r as t,h as s,H as i}from"./p-58739bdc.js";const o=class{constructor(s){t(this,s),this.iconName="",this.iconReverse=!1,this.iconOnly=!1,this.disabled=!1,this.fill="solid",this.expand=!1,this.color="primary",this.size="lg",this.glow=!1,this.type="button",this.loading=!1}render(){return s(i,{class:{button__host:!0,"button--block":this.expand,"button--secondary":"secondary"===this.color},"data-testid":"cc-button"},s(this.href?"a":"button",Object.assign({"data-testid":"cc-button__element",class:{button:!0,"button--reverse":this.iconReverse,"button--disabled":!this.href&&this.disabled,"button--outline":"outline"===this.fill,"button--clear":"clear"===this.fill,"button--md":"md"===this.size,"button--sm":"sm"===this.size,"button--iconOnly":this.iconOnly,"button--glow":this.glow}},{disabled:!this.href&&this.disabled,href:this.href,target:this.target,type:this.type}),this.iconName&&!this.loading&&s("cc-icon",{class:{button__icon:!0},name:this.iconName,size:"sm"===this.size?16:24}),this.loading&&s("cc-loader",{class:{button__icon:!0},size:"sm"===this.size?16:24}),s("span",{"data-testid":"cc-button__text",class:{button__text:!this.iconOnly,hidden:this.iconOnly}},s("slot",null))))}static get style(){return".button__host.sc-cc-button-h{display:inline-block;--cc-button-color-base:var(--primary);--cc-button-color-dark:var(--primary-dark);--cc-button-color-lightest:var(--primary-10);--cc-button-color-contrast:var(--neutral-04)}.button--block.sc-cc-button-h{display:block}.button--secondary.sc-cc-button-h{--cc-button-color-base:var(--secondary);--cc-button-color-dark:var(--secondary-dark);--cc-button-color-lightest:var(--secondary-10);--cc-button-color-contrast:var(--neutral-04)}.button.sc-cc-button{border-width:0;padding-left:1.6rem;padding-right:1.6rem;padding-top:.4rem;padding-bottom:.4rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:1.4rem;font-weight:700;border-radius:.4rem;outline:0;width:100%;line-height:2rem;border:1px solid transparent;line-height:2.4rem;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;height:4.8rem;background-color:var(--cc-button-color-base);color:var(--cc-button-color-contrast);cursor:pointer;text-decoration:none}.button--glow.sc-cc-button{background-image:-webkit-gradient(linear,left top,left bottom,from(var(--cc-button-color-base)),color-stop(50%,var(--cc-button-color-base)),color-stop(50%,var(--cc-button-color-dark)),to(var(--cc-button-color-dark)));background-image:linear-gradient(var(--cc-button-color-base),var(--cc-button-color-base) 50%,var(--cc-button-color-dark) 0,var(--cc-button-color-dark))}.button__text.sc-cc-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.button__icon.sc-cc-button{margin-right:.4rem}.button--reverse.sc-cc-button .button__icon.sc-cc-button{margin-right:0;margin-left:.4rem}.button--iconOnly.sc-cc-button .button__icon.sc-cc-button{margin:0}.button--iconOnly.sc-cc-button{width:4.8rem}.button--md.sc-cc-button{height:4rem}.button--md.button--iconOnly.sc-cc-button{width:4rem}.button--sm.sc-cc-button{font-size:1.2rem;font-weight:900;line-height:1.6rem;height:3.2rem}.button--sm.button--iconOnly.sc-cc-button{width:3.2rem}.button--reverse.sc-cc-button{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.button--outline.sc-cc-button{border-color:var(--cc-button-color-base);color:var(--cc-button-color-base);background:var(--cc-button-color-contrast)}.button--outline.button--glow.sc-cc-button{background-image:-webkit-gradient(linear,left top,left bottom,from(var(--cc-button-color-contrast)),color-stop(50%,var(--cc-button-color-contrast)),color-stop(50%,var(--cc-button-color-lightest)),to(var(--cc-button-color-lightest)));background-image:linear-gradient(var(--cc-button-color-contrast),var(--cc-button-color-contrast) 50%,var(--cc-button-color-lightest) 0,var(--cc-button-color-lightest))}.button--clear.sc-cc-button{background:transparent;color:var(--cc-button-color-base)}.button--disabled.sc-cc-button, .button.sc-cc-button:disabled{background:none;background-color:var(--disabled-background);color:var(--disabled-text);cursor:not-allowed}.button--disabled.button--clear.sc-cc-button, .button.sc-cc-button:disabled.button--clear{background:transparent}.button--disabled.button--outline.sc-cc-button, .button.sc-cc-button:disabled.button--outline{background:transparent;border-color:var(--disabled-background)}"}};export{o as cc_button};