/**
 * @deprecated Hover colors are no longer precomputed. Background hover uses
 * `hover-layer hover-layer-{subtle|default|strong}` pseudo-element utilities.
 * This module is kept only for compatibility with older tooling.
 */

/** One of the three hover overlay tiers used across the library. */
export type HoverVariant = 'subtle' | 'default' | 'strong';

/**
 * Read-only ordered list of the three hover tiers.
 */
export declare const HOVER_VARIANTS: readonly HoverVariant[];

/**
 * Dot-path prefixes identifying which token branches participate in hover mixing.
 * `background.*` for surface tints, `content.*` for text hover colors.
 */
export declare const HOVER_MIX_TOKEN_PREFIXES: readonly [
  'background.',
  'content.',
];

/** @deprecated Use {@link HOVER_MIX_TOKEN_PREFIXES}. */
export declare const HOVER_MIX_TOKEN_PREFIX: 'background.';

/** @deprecated Suffix previously used in generated CSS variable names. */
export declare const HOVER_MIX_CLASS_SUFFIX: 'hover';

/** Channels use 0–255; alpha uses 0–1. */
export interface Rgba {
  r: number;
  g: number;
  b: number;
  a: number;
}

/** Parse a `#rgb` / `#rgba` / `#rrggbb` / `#rrggbbaa` string to an `Rgba`. Returns `null` on bad input. */
export declare const parseHexColorToRgba: (hex: string) => Rgba | null;

/** Serialize an `Rgba` back to hex. Emits 8-digit form when alpha < 1, 6-digit otherwise. */
export declare const rgbaToHex: (rgba: Rgba) => string;

/** Flatten a semi-transparent color onto an opaque parent (source-over). */
export declare const flattenAlpha: (top: Rgba, parent: Rgba) => Rgba;

/**
 * Composite `top` over an opaque `bottom` using CSS `mix-blend-mode: overlay`
 * followed by source-over. Matches what the `v-hover` directive paints at
 * runtime once its overlay span is fully opaque.
 *
 *   overlay(Cb, Cs) = Cb ≤ 0.5 ?  2·Cb·Cs  :  1 − 2·(1−Cb)·(1−Cs)
 *   Co = αs·overlay(Cb, Cs) + (1 − αs)·Cb
 */
export declare const blendOverlay: (bottom: Rgba, top: Rgba) => Rgba;

/**
 * Convenience: hex + hex → composited hex. Works for `background.*` (surface)
 * and `content.*` (text) base tokens. If `baseHex` has alpha < 1,
 * `parentSurfaceHex` must be provided and is used to flatten the base before
 * the overlay blend so the result matches the on-screen pixel.
 */
export declare const mixHoverColor: (
  baseHex: string,
  overlayHex: string,
  parentSurfaceHex?: string,
) => string | null;

export interface BuildHoverMixVarsInput {
  /** Map of kebab var-name (without `--`) to hex color. */
  baseColors?: Record<string, string>;
  /** @deprecated Use `baseColors`. */
  bgColors?: Record<string, string>;
  /** Hex color per hover variant. */
  overlays: Partial<Record<HoverVariant, string>>;
  /**
   * Opaque surface (hex) that semi-transparent base tokens sit on — typically
   * the resolved value of `background.surface.primary` for the same mode.
   */
  parentSurface?: string;
}

/**
 * @deprecated Build a map of CSS variable name → hex color for every
 * `baseColors[name] × overlays[variant]` combination. The current UI library
 * hover classes no longer consume these generated variables.
 */
export declare const buildHoverMixVars: (
  input: BuildHoverMixVarsInput,
) => Record<string, string>;

/**
 * Wrap each var name with `oklch(var(--name))`. Used for UnoCSS `theme.colors`.
 */
export declare const buildHoverMixColors: (
  varNames: Iterable<string>,
) => Record<string, string>;
