import { useLocalStorage } from "../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-local-storage/use-local-storage.mjs";
import { useColorScheme as useColorScheme$1 } from "../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-color-scheme/use-color-scheme.mjs";
const useColorScheme = (defaultValue, options = { getInitialValueInEffect: false, key: "mantine-color-scheme" }) => {
  const [colorScheme, setColorScheme] = useLocalStorage({
    key: options.key,
    defaultValue,
    getInitialValueInEffect: options.getInitialValueInEffect
  });
  const systemColorScheme = useColorScheme$1(defaultValue === "auto" ? void 0 : defaultValue, {
    getInitialValueInEffect: options.getInitialValueInEffect
  });
  const toggleColorScheme = () => {
    setColorScheme((prev) => prev === "light" ? "dark" : "light");
  };
  return {
    colorScheme,
    setColorScheme,
    systemColorScheme,
    toggleColorScheme
  };
};
export {
  useColorScheme
};
