'use client';
import * as facelessUIImport from '@faceless-ui/modal';
import * as facelessUIImport3 from '@faceless-ui/scroll-info';
import * as facelessUIImport2 from '@faceless-ui/window-info';
import React, { Fragment } from 'react';
import { Slide, ToastContainer } from 'react-toastify';
import { LoadingOverlayProvider } from '../../elements/LoadingOverlay/index.js';
import { NavProvider } from '../../elements/Nav/context.js';
import { StepNavProvider } from '../../elements/StepNav/index.js';
import { ActionsProvider } from '../ActionsProvider/index.js';
import { AuthProvider } from '../Auth/index.js';
import { ClientFunctionProvider } from '../ClientFunction/index.js';
import { ComponentMapProvider } from '../ComponentMapProvider/index.js';
import { ConfigProvider } from '../Config/index.js';
import { DocumentEventsProvider } from '../DocumentEvents/index.js';
import { LocaleProvider } from '../Locale/index.js';
import { ParamsProvider } from '../Params/index.js';
import { PreferencesProvider } from '../Preferences/index.js';
import { SearchParamsProvider } from '../SearchParams/index.js';
import { ThemeProvider } from '../Theme/index.js';
import { TranslationProvider } from '../Translation/index.js';
export const RootProvider = ({ children, componentMap, config, fallbackLang, lang, languageOptions, translations })=>{
    const { ModalContainer, ModalProvider } = facelessUIImport || {
        ModalContainer: React.Fragment,
        ModalProvider: React.Fragment
    };
    const { WindowInfoProvider } = facelessUIImport2 || {
        WindowInfoProvider: React.Fragment
    };
    const { ScrollInfoProvider } = facelessUIImport3 || {
        ScrollInfoProvider: React.Fragment
    };
    return /*#__PURE__*/ React.createElement(Fragment, null, /*#__PURE__*/ React.createElement(ConfigProvider, {
        config: config
    }, /*#__PURE__*/ React.createElement(ComponentMapProvider, {
        componentMap: componentMap
    }, /*#__PURE__*/ React.createElement(ClientFunctionProvider, null, /*#__PURE__*/ React.createElement(TranslationProvider, {
        fallbackLang: fallbackLang,
        lang: lang,
        languageOptions: languageOptions,
        translations: translations
    }, /*#__PURE__*/ React.createElement(WindowInfoProvider, {
        breakpoints: {
            l: '(max-width: 1440px)',
            m: '(max-width: 1024px)',
            s: '(max-width: 768px)',
            xs: '(max-width: 400px)'
        }
    }, /*#__PURE__*/ React.createElement(ScrollInfoProvider, null, /*#__PURE__*/ React.createElement(SearchParamsProvider, null, /*#__PURE__*/ React.createElement(ModalProvider, {
        classPrefix: "payload",
        transTime: 0,
        zIndex: "var(--z-modal)"
    }, /*#__PURE__*/ React.createElement(AuthProvider, null, /*#__PURE__*/ React.createElement(PreferencesProvider, null, /*#__PURE__*/ React.createElement(ThemeProvider, null, /*#__PURE__*/ React.createElement(ParamsProvider, null, /*#__PURE__*/ React.createElement(LocaleProvider, null, /*#__PURE__*/ React.createElement(StepNavProvider, null, /*#__PURE__*/ React.createElement(LoadingOverlayProvider, null, /*#__PURE__*/ React.createElement(DocumentEventsProvider, null, /*#__PURE__*/ React.createElement(ActionsProvider, null, /*#__PURE__*/ React.createElement(NavProvider, null, children))))))))), /*#__PURE__*/ React.createElement(ModalContainer, null)))))))))), /*#__PURE__*/ React.createElement(ToastContainer, {
        icon: false,
        position: "bottom-center",
        transition: Slide
    }));
};

//# sourceMappingURL=index.js.map