"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("react-router-dom"),n=require("classnames"),s=require("../../components/DevCenter/DevCenterRouterContext/effects/useDevCenterRouter.js"),a=require("./UniversalLink.scss.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=u(n);exports.UniversalLink=function(n){var u=n.children,o=n.testId,c=n.href,l=n.className,d=s.useDevCenterRouter(),f=i.default(a.root,l),v=r.useCallback((function(e){e.stopPropagation(),e.preventDefault(),e.metaKey||e.ctrlKey?window.open(c,"_blank"):null==d||d.push(c)}),[d,c]);return d?e.jsx("a",{href:c,className:f,"data-testid":o,onClick:v,children:u}):e.jsx(t.Link,{"data-testid":o,to:c,className:f,children:u})};
//# sourceMappingURL=UniversalLink.js.map
