"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const useLocalStorage = require("../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-local-storage/use-local-storage.cjs");
const useColorScheme$1 = 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 useColorScheme = (defaultValue, options = { getInitialValueInEffect: false, key: "mantine-color-scheme" }) => {
  const [colorScheme, setColorScheme] = useLocalStorage.useLocalStorage({
    key: options.key,
    defaultValue,
    getInitialValueInEffect: options.getInitialValueInEffect
  });
  const systemColorScheme = useColorScheme$1.useColorScheme(defaultValue === "auto" ? void 0 : defaultValue, {
    getInitialValueInEffect: options.getInitialValueInEffect
  });
  const toggleColorScheme = () => {
    setColorScheme((prev) => prev === "light" ? "dark" : "light");
  };
  return {
    colorScheme,
    setColorScheme,
    systemColorScheme,
    toggleColorScheme
  };
};
exports.useColorScheme = useColorScheme;
