"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("react/jsx-runtime"),n=require("react"),i=require("classnames"),o=require("@material-ui/icons/Language"),a=require("../Tooltip/Tooltip.js"),l=require("./TextLink.scss.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(e),d=s(r),u=s(i),p=s(o),f=["to","children"],b=["children","className","testId","disableTooltip","disabled","component","to","onClick","target","type","underline"];function j(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function m(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?j(Object(t),!0).forEach((function(r){c.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var y=n.forwardRef((function(e,r){var n=e.to,i=e.children,o=d.default(e,f);return t.jsx("a",m(m({},o),{},{href:n,ref:r,children:i}))})),v={primary:l.primary,secondary:l.secondary},O={onHover:l.underlineOnHover,always:l.underlineAlways,never:l.underlineNever},h=n.forwardRef((function(e,r){var n=e.children,i=e.className,o=e.testId,s=e.disableTooltip,c=e.disabled,f=e.component,j=void 0===f?y:f,h=e.to,g=e.onClick,x=e.target,P=void 0===x?"_blank":x,w=e.type,k=void 0===w?"primary":w,q=e.underline,N=void 0===q?"onHover":q,T=d.default(e,b),D=u.default(l.link,c?l.disabled:l.enabled,v[k],O[N]),C=null==h?void 0:h.replaceAll("/","/​");return t.jsx(a.Tooltip,{title:t.jsxs("div",{className:l.tooltip,children:[t.jsx(p.default,{fontSize:"small",className:l.icon}),C]}),disabled:s,placement:"bottom-start",children:t.jsx("span",{ref:r,className:i,children:c?t.jsx("span",{className:D,children:n}):t.jsx(j,m(m({onClick:g,className:D,"data-testid":o,to:h,target:P},T),{},{children:n}))})})}));exports.TextLink=h;
//# sourceMappingURL=TextLink.js.map
