"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
var _styles = require("./styles");
var _reactNative = require("react-native");
var _Typography = require("../../../core/components/Typography/Typography");
var _reactNativeSvg = require("react-native-svg");
var _icons = require("../../../core/assets/icons");
var _Button = _interopRequireWildcard(require("../Button/Button"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const ErrorComponent = ({
  title,
  description,
  themeStyle,
  icon = _icons.errorPage,
  onPress
}) => {
  const styles = (0, _styles.useStyle)(themeStyle);
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgXml, {
    xml: icon()
  }), /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_Typography.Typography.Headline, {
    style: styles.title
  }, title), description && /*#__PURE__*/React.createElement(_Typography.Typography.Caption, {
    style: styles.description
  }, description)), onPress && /*#__PURE__*/React.createElement(_Button.default, {
    type: "primary",
    onPress: onPress,
    style: styles.button,
    size: _Button.BUTTON_SIZE.LARGE
  }, "Go back"));
};
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(ErrorComponent);
//# sourceMappingURL=ErrorComponent.js.map