"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.SettingsPageWrapper = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _SettingsPagePlain = require("./SettingsPagePlain");
var _PageErrorState = require("../PageErrorState");
var _react2 = require("@wix/bex-core/react");
var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/SettingsPage/SettingsPageWrapper.tsx";
function _SettingsPageWrapper({
  state,
  ...rest
}) {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  if (state.initTask.status.isError) {
    return /*#__PURE__*/_react.default.createElement(_PageErrorState.PageErrorState, (0, _extends2.default)({
      title: t('cairo.page.loadError.failedState.title'),
      subtitle: t('cairo.page.loadError.failedState.description'),
      retryText: t('cairo.page.loadError.failedState.CTA'),
      onRetry: () => state.retryFetch()
    }, rest, {
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 22,
        columnNumber: 7
      }
    }));
  }
  return /*#__PURE__*/_react.default.createElement(_SettingsPagePlain.SettingsPagePlain, (0, _extends2.default)({
    state: state
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 32,
      columnNumber: 10
    }
  }));
}
const SettingsPageWrapper = exports.SettingsPageWrapper = (0, _mobxReactLite.observer)(_SettingsPageWrapper);
//# sourceMappingURL=SettingsPageWrapper.js.map