"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const theme = require("./theme.cjs");
const useColorScheme = require("../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-color-scheme/use-color-scheme.cjs");
const MantineEmotionProvider = require("../node_modules/.pnpm/@mantine_emotion@7.15.2_@emotion_cache@11.14.0_@emotion_react@11.14.0_@types_react@18.3.18_re_vflj3eioazr6wkrxpatinf66nq/node_modules/@mantine/emotion/esm/MantineEmotionProvider.cjs");
const MantineProvider = require("../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/MantineProvider/MantineProvider.cjs");
const emotionTransform = require("../node_modules/.pnpm/@mantine_emotion@7.15.2_@emotion_cache@11.14.0_@emotion_react@11.14.0_@types_react@18.3.18_re_vflj3eioazr6wkrxpatinf66nq/node_modules/@mantine/emotion/esm/emotion-transform.cjs");
const mergeMantineTheme = require("../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs");
const Notifications = require("../node_modules/.pnpm/@mantine_notifications@7.15.2_@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@man_f2isygx54csmiytvhun5ksd6pm/node_modules/@mantine/notifications/esm/Notifications.cjs");
const ModalsProvider = require("../node_modules/.pnpm/@mantine_modals@7.15.2_@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_ho_m52wnmul7ebc6cajcp6sfoom74/node_modules/@mantine/modals/esm/ModalsProvider.cjs");
function ThemeProvider({
  children,
  colorScheme,
  theme: themeOverride,
  emotionCache,
  notifications,
  modals
}) {
  const systemColorScheme = useColorScheme.useColorScheme(colorScheme === "auto" ? void 0 : colorScheme, {
    getInitialValueInEffect: false
  });
  const colorSchemeResult = colorScheme === "auto" ? systemColorScheme : colorScheme;
  const theme$1 = theme.useTheme(colorSchemeResult);
  return /* @__PURE__ */ jsxRuntime.jsx(MantineEmotionProvider.MantineEmotionProvider, { cache: emotionCache, children: /* @__PURE__ */ jsxRuntime.jsxs(
    MantineProvider.MantineProvider,
    {
      forceColorScheme: colorSchemeResult,
      stylesTransform: emotionTransform.emotionTransform,
      theme: mergeMantineTheme.mergeMantineTheme(theme$1, themeOverride),
      children: [
        /* @__PURE__ */ jsxRuntime.jsx(Notifications.Notifications, { position: "top-center", ...notifications }),
        /* @__PURE__ */ jsxRuntime.jsx(ModalsProvider.ModalsProvider, { ...modals, children })
      ]
    }
  ) });
}
exports.ThemeProvider = ThemeProvider;
