import { RgbColor } from './color-math';
import { ContextSurface, TokenCheckConfig } from './token-checks';
/**
 * Search engine for finding perceptually-closest feasible colors in OKLCH space and
 * resolving minimum-alpha / RGB-shift fixes for WCAG contrast requirements.
 *
 * The constructor takes the static `fixedSurfaces` table and the `bg-primary` RGB used
 * as the underlying composite surface for semi-transparent paint. Both come from the
 * design-token map supplied by the consumer.
 */
export declare class ColorSearchEngine {
  private readonly fixedSurfaces;
  private readonly lightBgPrimary;
  constructor(fixedSurfaces: Readonly<Record<string, ContextSurface>>);
  /** Binary-search iterations on L axis; 10 → ~0.001 precision. */
  private static readonly SUGGESTION_SEARCH_ITERATIONS;
  /** Hue offsets (degrees) sampled during search; ±5° preserves brand hue family. */
  private static readonly SUGGESTION_HUE_OFFSETS_DEG;
  /** Chroma multipliers sampled during search; allows modest saturation drift. */
  private static readonly SUGGESTION_CHROMA_SCALES;
  /** Chroma below which the origin is treated as achromatic (hue/chroma grid skipped). */
  private static readonly ACHROMATIC_CHROMA_EPSILON;
  /** Uniform L-axis steps for linear scan; 100 → 0.01 precision, enough for narrow bands. */
  private static readonly L_SCAN_STEPS;
  /** 2⁻⁷ ≈ 0.008 precision; matches 2-decimal output rounding. */
  private static readonly ALPHA_ASCENT_ITERATIONS;
  /**
   * Find the closest feasible color (by OKLab ΔE) within a (hue ± 5°, chroma × 0.6–1.4) grid.
   *
   * @param {RgbColor} origin - Starting RGB color to search from.
   * @param {Function} isFeasible - Predicate returning true if a candidate RGB meets constraints.
   * @param {boolean} assumeMonotone - `true`: binary search on L (fast, monotone predicate required);
   *   `false`: linear scan on L (handles internal-band feasibility).
   * @returns {RgbColor | undefined} Closest feasible RGB, or `undefined` if none found in envelope.
   */
  searchClosestFeasibleInOklch(origin: RgbColor, isFeasible: (rgb: RgbColor) => boolean, assumeMonotone?: boolean): RgbColor | undefined;
  /**
   * Binary-search for the minimum alpha that makes composite contrast ≥ threshold.
   * Result is ceil-rounded to 2 decimals. Returns `undefined` if α=1.0 still fails.
   *
   * @param {RgbColor} rgb - Token's base RGB color.
   * @param {number} currentAlpha - Current alpha (lower bound for search).
   * @param {TokenCheckConfig} checkConfig - Token check configuration (pairing, type, compositedOn).
   * @param {number} threshold - Required WCAG contrast ratio.
   * @param {Map<string, string>} tokenMap - Resolved token map for surface lookups.
   * @returns {number | undefined} Minimum alpha (ceil-rounded), or `undefined` if infeasible.
   */
  findMinimumAlphaForContrast(rgb: RgbColor, currentAlpha: number, checkConfig: TokenCheckConfig, threshold: number, tokenMap: Map<string, string>): number | undefined;
  /**
   * Find the closest opaque RGB (by OKLab ΔE) satisfying WCAG threshold against all configs.
   *
   * @param {RgbColor} originalRgb - Starting RGB color.
   * @param {TokenCheckConfig[]} configs - Token check configs (one per paired surface).
   * @param {Map<string, string>} tokenMap - Resolved token map for surface lookups.
   * @returns {RgbColor | undefined} Closest feasible RGB, or `undefined` if none found.
   */
  findRgbPatchForContrastAll(originalRgb: RgbColor, configs: TokenCheckConfig[], tokenMap: Map<string, string>): RgbColor | undefined;
}
