"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactRedux = require("react-redux");
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
var _i18n = require("../../../Framework/i18n");
require("./Style.scss");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var ErrorPage = function ErrorPage() {
  var is404Error = (0, _reactRedux.useSelector)(function (state) {
    var _state$api;
    return state === null || state === void 0 || (_state$api = state.api) === null || _state$api === void 0 ? void 0 : _state$api.has404Error;
  });
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "error-wrapper"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "error-icon"
  }), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
    variant: "h1",
    className: "header"
  }, (0, _i18n.T)('errorPage.title')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
    className: "text"
  }, (0, _i18n.T)('errorPage.errorTexts.first')), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
    className: "text"
  }, (0, _i18n.T)('errorPage.errorTexts.second')), is404Error && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
    className: "text"
  }, (0, _i18n.T)('errorPage.errorTexts.404'))), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
    variant: "contained",
    color: "secondary",
    className: "button",
    onClick: function onClick() {
      window.location.reload();
    }
  }, (0, _i18n.T)('errorPage.reloadButton')));
};
var _default = exports["default"] = ErrorPage;