import{r as e,h as i,a as t}from"./p-PqnYwNKt.js";import{d as n,t as l}from"./p-DcmcuUOA.js";import{i as o}from"./p-Bw2fh5LT.js";import{c as r}from"./p-DMLRPGid.js";import"./p-B85MJLTf.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.link{display:inline-flex;align-items:center;font-weight:400;font-size:1rem;text-decoration:none;color:#0A8276;gap:8px;line-height:1.6;font-family:var(--ifx-font-family)}.link:hover{cursor:pointer}.link:focus{outline-width:2px;outline-style:solid;outline-color:#0A8276;outline-offset:4px;border-radius:3px}.link.bold{font-weight:600}.link.bold:hover{text-decoration:underline}.link.bold:active{color:#08665C;font-style:normal;font-weight:600;text-decoration:underline}.link.underlined{text-decoration:underline;text-decoration-color:#0A8276;color:#1D1D1D;text-underline-offset:8px}.link.underlined:hover{color:#0A8276}.link.underlined:active{color:#0A8276}.link.underlined:disabled,.link.underlined.disabled{text-decoration-color:#BFBBBB}.link.title{text-decoration:none;font-weight:600;color:#1D1D1D}.link.title:hover{color:#0A8276}.link.title:active{color:#08665C}.link.menu{font-weight:400;font-style:normal;line-height:26px;color:#1D1D1D}.link.menu:hover{color:#0A8276}.link.menu:active{color:#08665C}.link.small{font-size:0.875rem}.link.medium{font-size:1rem}.link.large{font-size:1.125rem}.link.extraLarge{font-size:1.25rem}.link.underline{text-decoration:underline}.link:disabled,.link.disabled{color:#BFBBBB;cursor:default;pointer-events:none}';const d=class{constructor(i){e(this,i);this.href=undefined;this.target="_self";this.variant="bold";this.disabled=false;this.internalHref="";this.internalTarget="";this.internalVariant=""}setInternalStates(){if(this.href){this.internalHref=this.href.trim()}else{this.internalHref=undefined}this.internalTarget=this.target.trim();this.internalVariant=this.variant.trim().toLowerCase()}componentWillRender(){this.setInternalStates()}handleKeyDown(e){if(this.disabled){e.preventDefault()}else if(e.key==="Enter"){e.preventDefault()}}async componentDidLoad(){if(!o(this.el)){const e=n();l("ifx-link",await e)}}render(){return i("a",{key:"3ca30a418b8c3d5193c91bec2448bd50ca50efe8",role:"link","aria-label":this.ariaLabel,"aria-disabled":this.disabled||!this.internalHref,href:this.disabled?undefined:this.internalHref,download:this.download,target:this.internalTarget,class:this.linkClassNames()},i("slot",{key:"89bd9e5d56db349c3ed675ef1aff2e7f977e77bd"}))}getSizeClass(){const e=this.size==="s"?"small":null;const i=this.size==="m"?"medium":null;const t=this.size==="l"?"large":null;const n=this.size==="xl"?"extraLarge":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n&&this.internalVariant==="underlined"){return"large"}else if(n&&this.internalVariant!=="underlined"){return n}else return""}getVariantClass(){const e=this.internalVariant==="bold"?"bold":null;const i=this.internalVariant==="title"?"title":null;const t=this.internalVariant==="underlined"?"underlined":null;const n=this.internalVariant==="menu"?"menu":null;if(e){return e}else if(i){return i}else if(t){return t}else if(n){return n}else return e}linkClassNames(){return r("link","primary",this.getVariantClass(),this.getSizeClass(),this.disabled?"disabled":"")}get el(){return t(this)}};d.style=s;export{d as ifx_link};
//# sourceMappingURL=p-99d05a4d.entry.js.map