import type { ExpandedPalette } from '../palette/expandPalette';
import type { SiteStyleSurfaceIntent } from './types';
export type AccessibleColorSurfaceIntent = Exclude<SiteStyleSurfaceIntent, 'hero-image'>;
export type ContrastPolicy = 'body-aa' | 'large-text-aa' | 'decorative';
export type ForegroundRole = 'heading' | 'text' | 'supporting';
export type AccessibleSurfaceToken = string & {
    readonly __brand: 'AccessibleSurfaceToken';
};
export type ForegroundFallbackReason = 'supporting-token-unsafe';
export type ResolvedForeground = Readonly<{
    kind: 'safe-token';
    role: ForegroundRole;
    token: AccessibleSurfaceToken;
    hex: string;
    contrastRatio: number;
}> | Readonly<{
    kind: 'fallback-to-text';
    role: Extract<ForegroundRole, 'supporting'>;
    token: AccessibleSurfaceToken;
    hex: string;
    contrastRatio: number;
    reason: ForegroundFallbackReason;
}>;
export type RejectedBackgroundCandidate = Readonly<{
    kind: 'background-candidate';
    token: string;
    reason: 'missing-token';
}>;
export type RejectedForegroundCandidate = Readonly<{
    kind: 'foreground-candidate';
    role: ForegroundRole;
    token: string;
}> & (Readonly<{
    reason: 'missing-token';
}> | Readonly<{
    reason: 'contrast-too-low';
    contrastRatio: number;
}>);
export type RejectedSurfaceCandidate = RejectedBackgroundCandidate | RejectedForegroundCandidate;
export type ResolvedAccessibleSurface = Readonly<{
    kind: 'resolved-accessible-surface';
    surface: AccessibleColorSurfaceIntent;
    background: Readonly<{
        token: AccessibleSurfaceToken;
        hex: string;
        inherited: boolean;
    }>;
    heading: Extract<ResolvedForeground, {
        kind: 'safe-token';
    }>;
    text: Extract<ResolvedForeground, {
        kind: 'safe-token';
    }>;
    supporting: ResolvedForeground;
    rejectedCandidates: readonly RejectedSurfaceCandidate[];
}>;
export type AccessibleSurfaceResolutionFailure = Readonly<{
    kind: 'accessible-surface-resolution-failure';
    surface: AccessibleColorSurfaceIntent;
    reason: 'no-background-candidate' | 'no-safe-foreground-candidate';
    rejectedCandidates: readonly RejectedSurfaceCandidate[];
}>;
export declare const contrastThresholdByPolicy: {
    readonly 'body-aa': 4.5;
    readonly 'large-text-aa': 3;
    readonly decorative: 1;
};
export declare function toAccessibleColorSurfaceIntent(surface: SiteStyleSurfaceIntent): AccessibleColorSurfaceIntent | null;
export declare function resolveAccessibleSurface(input: Readonly<{
    surface: AccessibleColorSurfaceIntent;
    palette: ExpandedPalette;
    policy?: ContrastPolicy;
}>): ResolvedAccessibleSurface | AccessibleSurfaceResolutionFailure;
export declare function resolveAccessibleSurfaceOrTerminalFallback(input: Readonly<{
    surface: AccessibleColorSurfaceIntent;
    palette: ExpandedPalette;
    policy?: ContrastPolicy;
}>): ResolvedAccessibleSurface;
export declare function requireResolvedAccessibleSurface(input: Readonly<{
    surface: AccessibleColorSurfaceIntent;
    palette: ExpandedPalette;
    policy?: ContrastPolicy;
}>): ResolvedAccessibleSurface;
