"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("classnames"),t=require("react-router-dom"),r=require("prop-types"),a=require("lodash"),n=require("../effects/useDevCenterRouter.js"),s=require("./UniversalLink.css.js"),i=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e),o=l(r);function d(e){var r=e.href,a=e.children,l=e.className,o=e["data-testid"],d=e.onClick,c=n.useDevCenterRouter();return c?i.jsx("a",{href:r||null,children:i.jsx("button",{"data-testid":o,tabIndex:"0",role:"link",className:u.default(s.buttonLink,l),onClick:function(e){r&&(e.stopPropagation(),d(e),e.metaKey||e.ctrlKey?window.open(r,"_blank"):c.push(r))},children:a})}):i.jsx(t.Link,{"data-testid":o,to:r,className:l,children:a})}d.propTypes={href:o.default.any,children:o.default.node.isRequired,className:o.default.string,onClick:o.default.func,"data-testid":o.default.string},d.defaultProps={className:null,"data-testid":"UniversalLink",href:null,onClick:a.noop},exports.UniversalLink=d;
//# sourceMappingURL=UniversalLink.js.map
