"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactHooks = _interopRequireDefault(require("@aries-framework/react-hooks"));
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _reactNativeSplashScreen = _interopRequireDefault(require("react-native-splash-screen"));
var _reactNativeToastMessage = _interopRequireDefault(require("react-native-toast-message"));
var _animatedComponents = require("./animated-components");
var _ErrorModal = _interopRequireDefault(require("./components/modals/ErrorModal"));
var _NetInfo = _interopRequireDefault(require("./components/network/NetInfo"));
var _ToastConfig = _interopRequireDefault(require("./components/toast/ToastConfig"));
var _CredentialOfferTourSteps = require("./components/tour/CredentialOfferTourSteps");
var _CredentialsTourSteps = require("./components/tour/CredentialsTourSteps");
var _HomeTourSteps = require("./components/tour/HomeTourSteps");
var _ProofRequestTourSteps = require("./components/tour/ProofRequestTourSteps");
var _containerApi = require("./container-api");
var _animatedComponents2 = require("./contexts/animated-components");
var _auth = require("./contexts/auth");
var _commons = require("./contexts/commons");
var _configuration = require("./contexts/configuration");
var _network = require("./contexts/network");
var _store = require("./contexts/store");
var _theme = require("./contexts/theme");
var _tourProvider = require("./contexts/tour/tour-provider");
var _defaultConfiguration = require("./defaultConfiguration");
var _localization = require("./localization");
var _RootStack = _interopRequireDefault(require("./navigators/RootStack"));
var _theme2 = require("./theme");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//import { credentialOfferTourSteps, credentialsTourSteps, proofRequestTourSteps } from './index'

(0, _localization.initLanguages)(_localization.translationResources);
function App(sytem) {
  return () => {
    (0, React.useMemo)(() => {
      (0, _localization.initStoredLanguage)().then();
    }, []);
    (0, React.useEffect)(() => {
      // Hide the native splash / loading screen so that our
      // RN version can be displayed.
      _reactNativeSplashScreen.default.hide();
    }, []);
    return /*#__PURE__*/React.createElement(_containerApi.ContainerProvider, {
      value: sytem
    }, /*#__PURE__*/React.createElement(_store.StoreProvider, null, /*#__PURE__*/React.createElement(_reactHooks.default, null, /*#__PURE__*/React.createElement(_theme.ThemeProvider, {
      value: _theme2.theme
    }, /*#__PURE__*/React.createElement(_animatedComponents2.AnimatedComponentsProvider, {
      value: _animatedComponents.animatedComponents
    }, /*#__PURE__*/React.createElement(_configuration.ConfigurationProvider, {
      value: _defaultConfiguration.defaultConfiguration
    }, /*#__PURE__*/React.createElement(_commons.CommonUtilProvider, null, /*#__PURE__*/React.createElement(_auth.AuthProvider, null, /*#__PURE__*/React.createElement(_network.NetworkProvider, null, /*#__PURE__*/React.createElement(_reactNative.StatusBar, {
      hidden: false,
      barStyle: "light-content",
      backgroundColor: _theme2.theme.ColorPallet.brand.primary,
      translucent: false
    }), /*#__PURE__*/React.createElement(_NetInfo.default, null), /*#__PURE__*/React.createElement(_ErrorModal.default, null), /*#__PURE__*/React.createElement(_tourProvider.TourProvider, {
      homeTourSteps: _HomeTourSteps.homeTourSteps,
      credentialsTourSteps: _CredentialsTourSteps.credentialsTourSteps,
      credentialOfferTourSteps: _CredentialOfferTourSteps.credentialOfferTourSteps,
      proofRequestTourSteps: _ProofRequestTourSteps.proofRequestTourSteps,
      overlayColor: 'gray',
      overlayOpacity: 0.7
    }, /*#__PURE__*/React.createElement(_RootStack.default, null)), /*#__PURE__*/React.createElement(_reactNativeToastMessage.default, {
      topOffset: 15,
      config: _ToastConfig.default
    }))))))))));
  };
}
var _default = App;
exports.default = _default;
//# sourceMappingURL=App.js.map