import type { ThemeMode } from './types';
import type { DefinedTheme } from './defineTheme';
/**
 * Internal context value — carries the theme + mode from Theme.
 * @internal
 */
export interface ThemeContextValue {
    /** The defined theme object */
    theme: DefinedTheme;
    /** The color mode prop passed to Theme */
    mode: ThemeMode;
}
/**
 * React context for the nearest Theme provider.
 * null when no provider is present.
 * @internal
 */
export declare const ThemeContext: import("react").Context<ThemeContextValue | null>;
/**
 * Resolved theme data returned by useTheme.
 */
export interface UseThemeReturn {
    /** Theme name */
    name: string;
    /** Resolved effective mode ('light' | 'dark') — never 'system' */
    mode: 'light' | 'dark';
    /**
     * Resolve a token to its raw CSS value for the current color mode.
     *
     * For tokens with [light, dark] tuples, returns the value matching
     * the current mode. For single-value tokens, returns the value as-is.
     *
     * Falls back to tokenDefaults if the token isn't overridden by the theme.
     *
     * @example
     * ```
     * const accent = token('--color-accent'); // "#0064E0" in light mode
     * const spacing = token('--spacing-4');   // "16px"
     * ```
     */
    token: (name: string) => string;
    /**
     * All tokens resolved for the current color mode.
     *
     * Merges tokenDefaults with the theme's overrides, resolving
     * light-dark() values based on the effective color mode.
     *
     * Memoized — stable reference unless theme or mode changes.
     */
    tokens: Record<string, string>;
}
/**
 * Return the nearest active Astryx theme name.
 *
 * Uses ThemeContext when present and otherwise follows the root Theme's
 * <html data-astryx-theme> attribute. This is intentionally lighter than
 * useTheme() for consumers that only need theme identity, such as semantic
 * icon resolution.
 */
export declare function useThemeName(): string | null;
/**
 * Access the current Astryx theme's token values, resolved for the active color mode.
 *
 * Returns raw CSS values (hex colors, px values, etc.) suitable for
 * non-CSS consumers like canvas, SVG, or data visualization libraries
 * (e.g. Vega, D3, Chart.js) that need concrete values rather than
 * CSS custom property references.
 *
 * When called outside a <Theme> provider, resolves mode from the root
 * Theme's `<html data-theme>` when one is present, falling back to the
 * current system color mode otherwise.
 *
 * @example
 * ```
 * function Chart() {
 *   const { token, mode } = useTheme();
 *   return (
 *     <svg>
 *       <rect fill={token('--color-accent')} />
 *       <text fill={token('--color-text-primary')}>Sales</text>
 *     </svg>
 *   );
 * }
 * ```
 */
export declare function useTheme(): UseThemeReturn;
//# sourceMappingURL=useTheme.d.ts.map