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