'use strict';
'use client';
import { jsx } from 'react/jsx-runtime';
import TitleProvider from '../../../fd-app-toolbox/layout/toolbar/title-provider/ToolbarTitleProvider.js';
import { ThemeProvider } from '../../../fd-app-toolbox/providers/ThemeProvider/ThemeProvider.js';
import { SaveCompleteProvider } from '../../../meta/edit-resource/SaveCompleteProvider.js';
import { SearchDialogProvider } from '../../../fd-app-toolbox/search/search-dialog-provider.js';
import { SidebarItemsProvider } from '../../../fd-app-toolbox/layout/sidebar/sidebar-resources-provider.js';
import { GlobalContextProvider } from '../../../meta/providers/global-provider/GlobalContext.js';
import { defaultGlobalConfig } from '../../../meta/providers/global-provider/default-config.js';
import { AuthProvider } from '../../../fd-app-toolbox/providers/auth-provider/AuthProvider.js';
import { SidebarProvider } from '../../../fd-app-toolbox/providers/sidebar-provider/SidebarContext.js';
import { ElementIdProvider } from '../../../../fd-toolbox/providers/element-id-provider/element-id-provider.js';
import { projectName } from '../../../../base-repo/app-constants/project-paths.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function Providers({
  children,
  appTitle,
  globalConfig
}) {
  return /* @__PURE__ */jsx(TitleProvider, {
    appTitle: appTitle ?? projectName,
    children: /* @__PURE__ */jsx(ThemeProvider, {
      children: /* @__PURE__ */jsx(GlobalContextProvider, {
        config: globalConfig ?? defaultGlobalConfig,
        children: /* @__PURE__ */jsx(AuthProvider, {
          children: /* @__PURE__ */jsx(ElementIdProvider, {
            children: /* @__PURE__ */jsx(SaveCompleteProvider, {
              children: /* @__PURE__ */jsx(SidebarProvider, {
                children: /* @__PURE__ */jsx(SearchDialogProvider, {
                  children: /* @__PURE__ */jsx(SidebarItemsProvider, {
                    children
                  })
                })
              })
            })
          })
        })
      })
    })
  });
}
__name(Providers, "Providers");

export { Providers };
