{"version":3,"file":"themes-B-9D8ICI.cjs","names":["ThemeContext","ThemeContext","__ThemeContext"],"sources":["../src/themes/configs/index.ts","../src/themes/contexts/ThemeContext.ts","../src/themes/hooks/index.ts","../src/themes/index.ts"],"sourcesContent":["import type { RzlThemeProviderProps } from \"../types\";\n\n/** @deprecated It used for internal-only, use `defaultThemes` directly.\n *\n * @internal\n */\nconst CONFIG_THEME = {\n  themes: [\"dark\", \"light\", \"system\"]\n} as const satisfies Pick<RzlThemeProviderProps, \"themes\">;\n\nexport const defaultThemes = CONFIG_THEME.themes;\n/** @internal */\nexport const defaultColorSchemes = [\"light\", \"dark\"];\n/** @internal */\nexport const MEDIA_SCHEME_THEME = \"(prefers-color-scheme: dark)\";\n\n/** @internal */\nexport const defaultMetaColorSchemeValue = {\n  light: \"#ffffff\",\n  dark: \"oklch(.13 .028 261.692)\"\n};\n","import { createRequiredContext } from \"@rzl-zone/core-react/context\";\n\nimport type { ThemeCtx } from \"../types\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { useTheme } from \"../hooks\";\n\n/** ------------------------------------------------------------\n * * ***React context for the app themes system.***\n * ------------------------------------------------------------\n * **Holds the current theme state and updater function, including\n * support for system-level theme preference.**\n *\n * ⚠️ ***Access this context only via `useTheme()` or within a\n * `<RzlThemeAppProvider>` or `<RzlThemePagesProvider>` tree.***, directly calling `React.useContext(ThemeContext)` outside the provider\n * will return `undefined`.\n *\n * @remarks\n * This context is intentionally exported to support advanced use-cases\n * (e.g., custom hooks), prefer the `useTheme()` hook for typical usage.\n * @see ***{@link useTheme | `useTheme()`}.***\n */\nexport const ThemeContext = createRequiredContext<ThemeCtx | undefined>(\n  \"RzlzoneNextThemeContext\"\n);\n","\"use client\";\n\nimport { ThemeContext } from \"../contexts/ThemeContext\";\n\nimport type { ThemeCtx } from \"../types\";\n\n/** ------------------------------------------------------------\n * * ***React hook for accessing the theme context (`App Router` or `Pages Router`).***\n * ------------------------------------------------------------\n * **Provides information about the currently active theme and utilities for\n * switching themes, including system-level theme support.**\n *\n * ⚠️ ***Must be used within the React component tree wrapped by `<RzlThemeAppProvider>` (`App Router`) or `<RzlThemePagesProvider>` (`Pages Router`).***\n *\n * @throws If called outside the provider hierarchy (i.e., not a descendant of **`<RzlThemeAppProvider>`** or **`<RzlThemePagesProvider>`** in the React tree).\n * @returns {ThemeCtx} Object containing current theme data and setter.\n */\nexport const useTheme = (): ThemeCtx => {\n  const themeContext = ThemeContext.use(\n    \"The `useTheme` hook must be wrapped with either `RzlThemeAppProvider` or `RzlThemePagesProvider`.\"\n  );\n\n  return themeContext;\n};\n","export type {\n  ThemeCtx,\n  RzlThemeProviderProps,\n  ThemeMode,\n  ThemeOverrideConfig\n} from \"./types\";\n\nexport { useTheme } from \"./hooks/index\";\nexport { defaultThemes } from \"./configs\";\nimport { ThemeContext as __ThemeContext } from \"./contexts/ThemeContext\";\n\nexport const ThemeContext = __ThemeContext.Context;\n"],"mappings":";;;;;;;;;;;;;;;;;AAMA,MAAM,eAAe,EACnB,QAAQ;CAAC;CAAQ;CAAS;AAAQ,EACpC;AAEA,MAAa,gBAAgB,aAAa;;AAE1C,MAAa,sBAAsB,CAAC,SAAS,MAAM;;AAEnD,MAAa,qBAAqB;;AAGlC,MAAa,8BAA8B;CACzC,OAAO;CACP,MAAM;AACR;;;;;;;;;;;;;;;;;;;ACCA,MAAaA,yEACX,yBACF;;;;;;;;;;;;;;;ACNA,MAAa,iBAA2B;CAKtC,OAJqBC,eAAa,IAChC,mGAGgB;AACpB;;;;ACZA,MAAa,eAAeC,eAAe"}
