import{defineProperty as i}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{getTestId as t,ComponentDefaultTestId as e}from"../../tests/testIds.js";import o from"classnames";import r,{forwardRef as s,useCallback as a}from"react";import{NOOP as n}from"../../utils/function-utils.js";import{Icon as l}from"@vibe/icon/mockedClassNames";import{IconPosition as m,LinkTarget as d}from"./LinkConsts.js";import{withStaticProps as c}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import p from"./Link.module.scss.js";import{getStyle as f}from"../../helpers/typesciptCssModulesHelper.js";import{camelCase as v}from"es-toolkit";import{ComponentVibeId as u}from"../../tests/constants.js";function b(i,t,e){if(i)return r.createElement(l,{className:e,icon:t,iconType:"font"})}var y=c(s((function(s,l){var m=s.className,d=s.textClassName,c=s.href,y=void 0===c?"":c,j=s.text,N=void 0===j?"":j,k=s.rel,h=void 0===k?"noreferrer":k,x=s.onClick,C=void 0===x?n:x,L=s.target,g=void 0===L?"_blank":L,P=s.ariaLabelDescription,E=void 0===P?"":P,S=s.color,D=void 0===S?"primary":S,I=s.ariaDescribedby,T=void 0===I?"":I,_=s.icon,z=void 0===_?"":_,B=s.iconPosition,F=s.id,H=void 0===F?"":F,K=s.ariaLabeledBy,w=void 0===K?"":K,M=s.disableNavigation,q=void 0!==M&&M,A=s.inheritFontSize,G=void 0!==A&&A,J=s.inlineText,O=void 0!==J&&J,Q=s.style,R=s["data-testid"],U="start"===(void 0===B?"start":B),V=a((function(i){q&&i.preventDefault(),C&&C(i)}),[q,C]);return r.createElement("a",{"data-testid":R||t(e.LINK,H),"data-vibe":u.LINK,id:H,href:y,rel:h,ref:l,onClick:V,target:g,style:Q,className:o(p.link,m,f(p,v("color-"+D)),i(i({},p.inheritFontSize,G),p.inlineText,O)),"aria-label":E,"aria-describedby":T,"aria-labelledby":w},b(U,z,o(p.iconStart)),r.createElement("span",{className:o(p.text,d)},N),b(!U,z,o(p.iconEnd)))})),{position:m,iconPositions:m,targets:d});export{y as default};
//# sourceMappingURL=Link.js.map
