import { _ as _defineProperty } from '../../../defineProperty-CrCYjjU3.js';
import { useEffect } from 'react';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import '../../../app-container-k74rOpXb.js';
import BrowserSupport from '@bigbinary/neeto-molecules/v2/BrowserSupport';
import StickyRibbonsContainer from '@bigbinary/neeto-molecules/v2/StickyRibbonsContainer';
import { BrowserRouter } from 'react-router-dom';
import { Toaster } from '@bigbinary/neeto-atoms/primitives/Sonner';
import HoneybadgerErrorBoundary from '../HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js';
import QueryClientProvider from '../QueryClientProvider/QueryClientProvider.js';
import { jsx, jsxs } from 'react/jsx-runtime';
import '../../../typeof-D-UKOauR.js';
import '@honeybadger-io/react';
import '../HoneybadgerErrorBoundary/constants.js';
import '../HoneybadgerErrorBoundary/FallbackComponent.js';
import '@bigbinary/neeto-atoms';
import 'dompurify';
import 'ramda';
import 'react-i18next';
import '../HoneybadgerErrorBoundary/utils.js';
import '@tanstack/react-query';
import '../QueryClientProvider/queryClient.js';
import '../../constants/index.js';
import '../../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(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;
  useEffect(function () {
    var pageLoader = document.getElementById("neeto-page-loader");
    if (pageLoader) pageLoader.remove();
  }, []);
  return /*#__PURE__*/jsx(HoneybadgerErrorBoundary, _objectSpread(_objectSpread({}, honeybadgerErrorBoundaryProps), {}, {
    children: /*#__PURE__*/jsxs(BrowserSupport, _objectSpread(_objectSpread({}, browserSupportProps), {}, {
      children: [/*#__PURE__*/jsx(Toaster, _objectSpread({}, toastContainerProps)), /*#__PURE__*/jsxs(QueryClientProvider, {
        children: [globalProps.authenticated && enableStickyRibbons && /*#__PURE__*/jsx(StickyRibbonsContainer, {}), /*#__PURE__*/jsx(BrowserRouter, {
          children: children
        }), /*#__PURE__*/jsx(ReactQueryDevtools, _objectSpread({
          initialIsOpen: false,
          position: "bottom"
        }, reactQueryDevtoolsProps))]
      })]
    }))
  }));
};

export { AppContainer as default };
//# sourceMappingURL=AppContainer.js.map
