"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrCrashFallback = void 0;
var _fullScreenErrorBoundaryImg = _interopRequireDefault(require("./assets/full-screen-error-boundary-img.png"));
var _i18n = require("../../i18n");
var _icon = require("../icon");
var _type = require("../icon/type");
var _env = require("agora-foundation/lib/utilities/env");
require("./index.css");
var _jsxRuntime = require("react/jsx-runtime");
var FcrCrashFallback = exports.FcrCrashFallback = function FcrCrashFallback(_ref) {
  var handleFallback = _ref.handleFallback;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: "fcr-pc-full-screen-error",
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: "fcr-pc-full-screen-error-content",
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
        src: _fullScreenErrorBoundaryImg["default"],
        className: "fcr-pc-full-screen-error-content-img"
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: "fcr-pc-full-screen-error-content-title",
        children: (0, _i18n.transI18n)('fmt_failure_popup_label_crash')
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: "fcr-pc-full-screen-error-content-desc",
        children: (0, _i18n.transI18n)('fmt_failure_popup_label_crash_tips')
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: "fcr-pc-full-screen-close-btn",
        onClick: handleFallback,
        children: (0, _env.isElectron)() ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
          children: (0, _i18n.transI18n)('fmt_failure_popup_button_close_app')
        }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
            type: _type.FcrIconType.FCR_RESET,
            size: 30,
            colors: {
              iconPrimary: 'var(--fcr_ui_scene_inverse)'
            }
          }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
            children: (0, _i18n.transI18n)('fmt_failure_popup_button_refresh')
          })]
        })
      })]
    })
  });
};