import type { PropsWithChildren } from "react";

export type ThemeMode = "light" | "dark";
export type ThemeTokens = Record<string, string>;

export interface ThemeContextValue {
  theme: ThemeMode;
  setTheme: (nextTheme: ThemeMode) => void;
  toggleTheme: () => void;
  themeTokens: ThemeTokens;
  setThemeTokens: (
    nextTokensOrUpdater:
      | ThemeTokens
      | ((previousTokens: ThemeTokens) => ThemeTokens)
  ) => void;
  setThemeColor: (color: string, tokenList?: string[]) => void;
  resetThemeTokens: () => void;
}

export declare function ThemeProvider(props: PropsWithChildren): JSX.Element;

export declare function useTheme(): ThemeContextValue;