"use client";
const require_local_storage_manager = require("./color-scheme-managers/local-storage-manager.cjs");
const require_Mantine_context = require("./Mantine.context.cjs");
const require_use_provider_color_scheme = require("./use-mantine-color-scheme/use-provider-color-scheme.cjs");
require("./baseline.cjs");
require("./global.cjs");
require("./default-css-variables.cjs");
const require_MantineThemeProvider = require("./MantineThemeProvider/MantineThemeProvider.cjs");
const require_MantineClasses = require("./MantineClasses/MantineClasses.cjs");
const require_MantineCssVariables = require("./MantineCssVariables/MantineCssVariables.cjs");
const require_use_respect_reduce_motion = require("./use-respect-reduce-motion/use-respect-reduce-motion.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/core/MantineProvider/MantineProvider.tsx
function MantineProvider({ theme, children, getStyleNonce, withStaticClasses = true, withGlobalClasses = true, deduplicateCssVariables = true, withCssVariables = true, cssVariablesSelector, classNamesPrefix = "mantine", colorSchemeManager = require_local_storage_manager.localStorageColorSchemeManager(), defaultColorScheme = "light", getRootElement = () => document.documentElement, cssVariablesResolver, forceColorScheme, stylesTransform, env, deduplicateInlineStyles = false }) {
	const { colorScheme, setColorScheme, clearColorScheme } = require_use_provider_color_scheme.useProviderColorScheme({
		defaultColorScheme,
		forceColorScheme,
		manager: colorSchemeManager,
		getRootElement
	});
	require_use_respect_reduce_motion.useRespectReduceMotion({
		respectReducedMotion: theme?.respectReducedMotion || false,
		getRootElement
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Mantine_context.MantineContext, {
		value: {
			colorScheme,
			setColorScheme,
			clearColorScheme,
			getRootElement,
			classNamesPrefix,
			getStyleNonce,
			cssVariablesResolver,
			cssVariablesSelector: cssVariablesSelector ?? ":root",
			withStaticClasses,
			stylesTransform,
			env,
			deduplicateInlineStyles
		},
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_MantineThemeProvider.MantineThemeProvider, {
			theme,
			children: [
				withCssVariables && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MantineCssVariables.MantineCssVariables, {
					cssVariablesSelector,
					deduplicateCssVariables
				}),
				withGlobalClasses && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MantineClasses.MantineClasses, {}),
				children
			]
		})
	});
}
MantineProvider.displayName = "@mantine/core/MantineProvider";
function HeadlessMantineProvider({ children, theme, env }) {
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Mantine_context.MantineContext, {
		value: {
			colorScheme: "auto",
			setColorScheme: () => {},
			clearColorScheme: () => {},
			getRootElement: () => document.documentElement,
			classNamesPrefix: "mantine",
			cssVariablesSelector: ":root",
			withStaticClasses: false,
			headless: true,
			env
		},
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MantineThemeProvider.MantineThemeProvider, {
			theme,
			children
		})
	});
}
HeadlessMantineProvider.displayName = "@mantine/core/HeadlessMantineProvider";
//#endregion
exports.HeadlessMantineProvider = HeadlessMantineProvider;
exports.MantineProvider = MantineProvider;

//# sourceMappingURL=MantineProvider.cjs.map