import{p as t,H as n,h as o,d as e,t as i}from"./p-CHfEnK-2.js";import{c as r}from"./p-DMLRPGid.js";import{i as a,d as s,t as d}from"./p-94ZtGp9D.js";import{d as b}from"./p-B5hDbbCP.js";const c=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}variant="primary";size="m";disabled=!1;icon;updateIcon(t){this.internalIcon=t}href;target="_self";shape="round";ariaLabelText;internalIcon;focusableElement;async setFocus(){this.focusableElement.focus()}handleClick(t){this.disabled&&t.stopImmediatePropagation()}componentWillLoad(){this.internalIcon=this.icon}async componentDidLoad(){if(!a(this.el)){const t=s();d("ifx-icon-button",await t)}}render(){return o(e,{key:"f49a3ed9259acb2f9ae740cd85f81f01c88871ac","aria-disabled":this.disabled,"aria-label":this.ariaLabelText},this.href?o("a",{ref:t=>this.focusableElement=t,class:this.getClassNames(),href:this.disabled?void 0:this.href,target:this.target,rel:"_blank"===this.target?"noopener noreferrer":void 0},o("ifx-icon",{icon:this.internalIcon})):o("button",{class:this.getClassNames(),type:"button",disabled:this.disabled},o("ifx-icon",{icon:this.internalIcon})))}getVariantClass(){return"secondary"==`${this.variant}`?"secondary":"tertiary"==`${this.variant}`?"tertiary":"primary"}getSizeClass(){return["xs","s","m","l"].includes(this.size)?this.size:"m"}getClassNames(){return r("btn icon-button",`btn-${this.shape||"round"}`,`btn-${this.getSizeClass()}`,`btn-${this.getVariantClass()}`,this.disabled?"disabled":"")}static get watchers(){return{icon:[{updateIcon:0}]}}static get style(){return":host{display:inline-flex}.btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px;gap:8px;color:#FFFFFF;flex-direction:row;font-weight:600;border-radius:1px;line-height:1.5rem;outline:none;font-family:var(--ifx-font-family);text-decoration:none;user-select:none;border:1px solid rgba(0, 0, 0, 0);font-size:1rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.btn:not(.disabled){cursor:pointer}.btn-primary{color:#FFFFFF;background-color:#0A8276}.btn-primary:disabled,.btn-primary.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary{color:#0A8276;background-color:#FFFFFF;border-color:#0A8276}.btn-secondary:disabled,.btn-secondary.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary{background-color:transparent;color:#1D1D1D}.btn-tertiary:disabled,.btn-tertiary.disabled{color:#BFBBBB;pointer-events:none}.btn.icon-button{min-width:initial;min-height:initial;width:40px;height:40px;padding:0;justify-content:center}.btn.icon-button.btn-round{border-radius:100px}.btn.icon-button.btn-square{border-radius:1px}.btn.icon-button.btn-xs{width:20px;height:20px;padding:2px}.btn.icon-button.btn-s{width:32px;height:32px;padding:8px}.btn.icon-button.btn-m{width:40px;height:40px;padding:0}.btn.icon-button.btn-l{width:48px;height:48px;padding:8px}.btn.btn-primary:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-primary:not(:disabled,.disabled):hover{background-color:#08665C;border-color:#08665C}.btn.btn-primary:not(:disabled,.disabled):active,.btn.btn-primary:not(:disabled,.disabled).active{background-color:#06534B;border-color:#06534B}.btn.btn-secondary:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary:not(:disabled,.disabled):hover{background-color:#08665C;border-color:#08665C;color:#FFFFFF}.btn.btn-secondary:not(:disabled,.disabled):active,.btn.btn-secondary:not(:disabled,.disabled).active{background-color:#06534B;border-color:#06534B}.btn.btn-tertiary:not(:disabled,.disabled):focus:not(:active,.active){outline:none;color:#1D1D1D;box-shadow:0 0 0 0px #FFFFFF, 0 0 0 2px #0A8276}.btn.btn-tertiary:not(:disabled,.disabled):hover{color:#0A8276}.btn.btn-tertiary:not(:disabled,.disabled):active,.btn.btn-tertiary:not(:disabled,.disabled).active{color:#08665C}"}},[513,"ifx-icon-button",{variant:[1],size:[1],disabled:[4],icon:[1],href:[1],target:[1],shape:[1],ariaLabelText:[1,"aria-label-text"],internalIcon:[32],setFocus:[64]},[[2,"click","handleClick"]],{icon:[{updateIcon:0}]}]);function l(){"undefined"!=typeof customElements&&["ifx-icon-button","ifx-icon"].forEach((t=>{switch(t){case"ifx-icon-button":customElements.get(i(t))||customElements.define(i(t),c);break;case"ifx-icon":customElements.get(i(t))||b()}}))}export{c as I,l as d}