"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _Link = _interopRequireDefault(require("@material-ui/core/Link"));
var _Icon = _interopRequireDefault(require("../DataDisplay/Icon"));
var _styles = require("@material-ui/core/styles");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var useStyles = (0, _styles.makeStyles)(function (theme) {
  return {
    link: {
      display: "flex"
    },
    iconContainer: {
      paddingTop: theme.spacing(0.5),
      paddingLeft: theme.spacing(1),
      width: theme.spacing(1.2),
      height: theme.spacing(1.2),
      color: theme.palette.primary.main
    },
    icon: {
      color: "inherit"
    }
  };
});
var ExternalLink = function ExternalLink(_ref) {
  var id = _ref.id,
    url = _ref.url,
    children = _ref.children;
  var classes = useStyles();
  return /*#__PURE__*/_react.default.createElement(_Link.default, {
    id: id,
    href: url,
    rel: "noreferrer",
    target: "_blank",
    underline: "always",
    className: classes.link
  }, children, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.iconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "open-in-new-tab",
    className: classes.icon
  })));
};
__signature__(ExternalLink, "useStyles{classes}", function () {
  return [useStyles];
});
__signature__(ExternalLink, "useStyles{classes}", function () {
  return [useStyles];
});
var _default = ExternalLink;
var _default2 = _default;
var _default3 = exports.default = _default2;
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
  reactHotLoader.register(ExternalLink, "ExternalLink", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
  reactHotLoader.register(ExternalLink, "ExternalLink", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Navigation/ExternalLink.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();