'use strict';

var defineProperty = require('../../../defineProperty-COGyJ6Og.js');
var React = require('react');
var reactQueryDevtools = require('@tanstack/react-query-devtools');
require('../../../app-container-Ck1J-BjW.js');
var BrowserSupport = require('@bigbinary/neeto-molecules/v2/BrowserSupport');
var StickyRibbonsContainer = require('@bigbinary/neeto-molecules/v2/StickyRibbonsContainer');
var reactRouterDom = require('react-router-dom');
var Sonner = require('@bigbinary/neeto-atoms/primitives/Sonner');
var v2_reactUtils_HoneybadgerErrorBoundary_HoneybadgerErrorBoundary = require('../HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js');
var v2_reactUtils_QueryClientProvider_QueryClientProvider = require('../QueryClientProvider/QueryClientProvider.js');
var jsxRuntime = require('react/jsx-runtime');
require('../../../toPropertyKey-DW-YC76_.js');
require('../../../typeof-D4ZZ_FlZ.js');
require('@honeybadger-io/react');
require('../../initializers/honeybadger/index.js');
require('../../initializers/honeybadger/constants.js');
require('../../initializers/honeybadger/utils.js');
require('../HoneybadgerErrorBoundary/FallbackComponent.js');
require('@bigbinary/neeto-atoms');
require('dompurify');
require('ramda');
require('react-i18next');
require('@tanstack/react-query');
require('../QueryClientProvider/queryClient.js');
require('../../constants/index.js');
require('../../constants/regex.js');

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var AppContainer = function AppContainer(_ref) {
  var children = _ref.children,
    browserSupportProps = _ref.browserSupportProps,
    _ref$enableStickyRibb = _ref.enableStickyRibbons,
    enableStickyRibbons = _ref$enableStickyRibb === void 0 ? globalProps.ssoEnabled : _ref$enableStickyRibb,
    honeybadgerErrorBoundaryProps = _ref.honeybadgerErrorBoundaryProps,
    reactQueryDevtoolsProps = _ref.reactQueryDevtoolsProps,
    toastContainerProps = _ref.toastContainerProps;
  React.useEffect(function () {
    var pageLoader = document.getElementById("neeto-page-loader");
    if (pageLoader) pageLoader.remove();
  }, []);
  return /*#__PURE__*/jsxRuntime.jsx(v2_reactUtils_HoneybadgerErrorBoundary_HoneybadgerErrorBoundary, _objectSpread(_objectSpread({}, honeybadgerErrorBoundaryProps), {}, {
    children: /*#__PURE__*/jsxRuntime.jsxs(BrowserSupport, _objectSpread(_objectSpread({}, browserSupportProps), {}, {
      children: [/*#__PURE__*/jsxRuntime.jsx(Sonner.Toaster, _objectSpread({}, toastContainerProps)), /*#__PURE__*/jsxRuntime.jsxs(v2_reactUtils_QueryClientProvider_QueryClientProvider, {
        children: [globalProps.authenticated && enableStickyRibbons && /*#__PURE__*/jsxRuntime.jsx(StickyRibbonsContainer, {}), /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.BrowserRouter, {
          children: children
        }), /*#__PURE__*/jsxRuntime.jsx(reactQueryDevtools.ReactQueryDevtools, _objectSpread({
          initialIsOpen: false,
          position: "bottom"
        }, reactQueryDevtoolsProps))]
      })]
    }))
  }));
};

module.exports = AppContainer;
//# sourceMappingURL=AppContainer.js.map
