import{jsxs as i,jsx as e}from"react/jsx-runtime";import t from"classnames";import{forwardRef as n,useCallback as o}from"react";import{backwardCompatibilityForProperties as r}from"../../helpers/backwardCompatibilityForProperties.js";import{NOOP as a}from"../../utils/function-utils.js";import s from"../Icon/Icon.js";import{IconPosition as l,LinkTarget as c}from"./LinkConsts.js";import"./Link.scss.js";var m,p,f=n((function(n,a){var s=n.href,c=n.text,m=n.rel,p=n.onClick,f=n.target,b=n.ariaLabelDescription,u=n.icon,N=n.iconPosition,g=n.id,k=n.ariaLabeledBy,v=n.disableNavigation,y=n.inheritFontSize,h=n.inlineText,j=r([n.className,n.componentClassName]),x=N===l.START,T=o((function(i){v&&i.preventDefault(),p&&p(i)}),[v,p]);return i("a",Object.assign({id:g,href:s,rel:m,ref:a,onClick:T,target:f,className:t("l3-style-link",j,{"inherit-font-size":y,"inline-text":h}),"aria-label":b,"aria-labelledby":k},{children:[d(x,u,"l3-style-link--icon-start"),e("span",Object.assign({className:"l3-style-link--text"},{children:c})),d(!x,u,"l3-style-link--icon-end")]}))}));function d(i,t,n){if(i)return e(s,{className:n,clickable:!1,icon:t,iconType:s.type.ICON_FONT})}Object.assign(f,{position:l,target:c,iconPositions:l,targets:c}),f.defaultProps={id:"",className:void 0,href:"",text:"",rel:"noreferrer",onClick:a,target:null===(m=f.targets)||void 0===m?void 0:m.NEW_WINDOW,ariaLabelDescription:"",icon:"",iconPosition:null===(p=f.position)||void 0===p?void 0:p.START,ariaLabeledBy:"",disableNavigation:!1,inheritFontSize:!1,inlineText:!1};var b=f;export{b as default};
