"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),s=require("react"),r=require("classnames"),i=require("@material-ui/icons/Language"),a=require("../Tooltip/Tooltip.js"),l=require("./TextLink.scss.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(r),d=o(i),c=s.forwardRef((function(s,r){var i=s.to,a=s.children,l=e.__rest(s,["to","children"]);return t.jsx("a",e.__assign({},l,{href:i,ref:r,children:a}))})),u=s.forwardRef((function(s,r){var i=s.children,o=s.className,u=s.testId,f=s.disableTooltip,m=s.disabled,p=s.component,b=void 0===p?c:p,j=s.to,x=s.onClick,_=s.target,h=void 0===_?"_blank":_,v=e.__rest(s,["children","className","testId","disableTooltip","disabled","component","to","onClick","target"]),g=n.default(l.root,m?l.disabled:l.enabled),q=null==j?void 0:j.replaceAll("/","/​");return t.jsx(a.Tooltip,{title:t.jsxs("div",{className:l.tooltip,children:[t.jsx(d.default,{fontSize:"small",className:l.icon}),q]}),disabled:f,placement:"bottom-start",children:t.jsx("span",{ref:r,className:o,children:m?t.jsx("span",{className:g,children:i}):t.jsx(b,e.__assign({onClick:x,className:g,"data-testid":u,to:j,target:h},v,{children:i}))})})}));exports.TextLink=u;
