"use strict";

exports.__esModule = true;
exports.default = exports.InternetExplorerWarningMessage = void 0;
var _react = _interopRequireDefault(require("react"));
var _styles = require("@material-ui/core/styles");
var _Icon = _interopRequireDefault(require("./MaterialUI/DataDisplay/Icon"));
var _reactIntl = require("react-intl");
var _Modal = _interopRequireDefault(require("@material-ui/core/Modal"));
var _sharedMessages = _interopRequireDefault(require("../sharedMessages"));
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 {
    container: {
      fontFamily: "'Open Sans', sans-serif",
      fontSize: "14px",
      background: "rgba(255,255,255,0.85)",
      maxWidth: "700px",
      width: "calc(100% - 40px)",
      display: "block",
      top: "50%",
      left: "50%",
      position: "absolute",
      boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)",
      transform: "translateY(-50%) translateX(-50%)",
      padding: "80px",
      borderRadius: "3px",
      "& header": {
        paddingBottom: "20px",
        marginBottom: "20px",
        borderBottom: "1px solid #999",
        "& h1": {
          fontWeight: 400,
          fontWize: "30px",
          marginTop: 0,
          marginBottom: "5px",
          "& p": {
            fontSize: "16px",
            margin: 0,
            color: "#999",
            fontWeight: 400
          }
        }
      }
    },
    grid: {
      display: "flex",
      flexWrap: "wrap",
      width: "100%",
      boxSizing: "border-box",
      marginTop: "40px"
    },
    gridItem: {
      display: "flex",
      flex: "0 1 16.667%",
      maxWidth: "16.667%",
      flexDirection: "column"
    },
    browserIconContainer: {
      width: "48px",
      textAlign: "center"
    },
    browserIconCaption: {
      fontSize: "11px",
      color: "#999"
    },
    browserIcon: {
      stroke: "none",
      fontSize: "48px"
    }
  };
});
var InternetExplorerWarningMessage = exports.InternetExplorerWarningMessage = function InternetExplorerWarningMessage() {
  var classes = useStyles();
  var isIE = !!window.MSInputMethodContext && !!document.documentMode;
  if (!isIE) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_Modal.default, {
    open: true,
    disablePortal: true,
    disableAutoFocus: true,
    disableEnforceFocus: true,
    disableBackdropClick: true,
    disableEscapeKeyDown: true
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.container
  }, /*#__PURE__*/_react.default.createElement("header", null, /*#__PURE__*/_react.default.createElement("h1", null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.ccName)), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.ccDescription))), /*#__PURE__*/_react.default.createElement("h2", null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.internetExplorerWarningTitle)), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.internetExplorerWarningContent)), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.grid
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.gridItem
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "chrome",
    className: classes.browserIcon
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconCaption
  }, "Google Chrome"))), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.gridItem
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "firefox",
    className: classes.browserIcon
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconCaption
  }, "Mozilla Firefox"))), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.gridItem
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "edge",
    className: classes.browserIcon
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconCaption
  }, "Microsoft Edge"))), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.gridItem
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "safari",
    className: classes.browserIcon
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconCaption
  }, "Safari (MacOS)"))), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.gridItem
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconContainer
  }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
    id: "opera",
    className: classes.browserIcon
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: classes.browserIconCaption
  }, "Opera"))))));
};
__signature__(InternetExplorerWarningMessage, "useStyles{classes}", function () {
  return [useStyles];
});
__signature__(InternetExplorerWarningMessage, "useStyles{classes}", function () {
  return [useStyles];
});
var _default = _react.default.memo(InternetExplorerWarningMessage);
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/InternetExplorerWarningMessage.js");
  reactHotLoader.register(InternetExplorerWarningMessage, "InternetExplorerWarningMessage", "/home/vsts/work/1/s/src/components/InternetExplorerWarningMessage.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/InternetExplorerWarningMessage.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/InternetExplorerWarningMessage.js");
  reactHotLoader.register(InternetExplorerWarningMessage, "InternetExplorerWarningMessage", "/home/vsts/work/1/s/src/components/InternetExplorerWarningMessage.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/InternetExplorerWarningMessage.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();