import { z } from 'zod';
import { type StyleTags } from '../../site-styles/styleTags';
/**
 * Branded ID for a palette variant in the curated library. Shape matches the
 * `Brand<T, TBrand>` convention in `site-styles/types.ts`. Use the helper at
 * the parse/construction boundary.
 */
export type PaletteVariantId<T extends string = string> = T & {
    readonly __brand: 'PaletteVariantId';
};
export declare function asPaletteVariantId<const T extends string>(value: T): PaletteVariantId<T>;
export declare const paletteVariantIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PaletteVariantId<string>, string>>;
/**
 * Known palette role token names. Closed union so unknown tokens can't be
 * persisted via `paletteOverrides`. Add a new role here intentionally.
 */
export declare const PALETTE_TOKEN_NAMES: readonly ["primary", "primaryForeground", "secondary", "accent", "success", "warning", "destructive", "background", "surface", "surfaceAlt", "muted", "text", "border"];
export type PaletteTokenName = (typeof PALETTE_TOKEN_NAMES)[number];
export declare const paletteTokenNameSchema: z.ZodEnum<{
    success: "success";
    text: "text";
    surface: "surface";
    warning: "warning";
    border: "border";
    background: "background";
    primary: "primary";
    secondary: "secondary";
    primaryForeground: "primaryForeground";
    accent: "accent";
    destructive: "destructive";
    surfaceAlt: "surfaceAlt";
    muted: "muted";
}>;
export type HexColor = string & {
    readonly __brand: 'HexColor';
};
export declare const hexColorSchema: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
/**
 * One slot in a palette variant. `name` is restricted to the closed
 * `PaletteTokenName` union so authoring typos (`'priamry'`) are caught at
 * compile time; the value side stays as raw `string` (validated by
 * `paletteColorSchema`'s less-strict regex for back-compat with existing data).
 */
export type PaletteColor = Readonly<{
    name: PaletteTokenName;
    hex: string;
}>;
export type PaletteVariant<TId extends PaletteVariantId = PaletteVariantId> = Readonly<{
    id: TId;
    name: string;
    description: string;
    tags: StyleTags;
    mode: 'light' | 'dark';
    colors: ReadonlyArray<PaletteColor>;
}>;
export declare const paletteVariantSchema: z.ZodObject<{
    id: z.ZodPipe<z.ZodString, z.ZodTransform<PaletteVariantId<string>, string>>;
    name: z.ZodString;
    description: z.ZodString;
    tags: z.ZodObject<{
        tone: z.ZodOptional<z.ZodEnum<{
            bold: "bold";
            minimal: "minimal";
            classic: "classic";
        }>>;
        energy: z.ZodOptional<z.ZodEnum<{
            calm: "calm";
            vibrant: "vibrant";
        }>>;
        motion: z.ZodOptional<z.ZodEnum<{
            standard: "standard";
            subtle: "subtle";
            expressive: "expressive";
        }>>;
        era: z.ZodOptional<z.ZodEnum<{
            editorial: "editorial";
            modern: "modern";
            retro: "retro";
            technical: "technical";
            organic: "organic";
        }>>;
    }, z.core.$strip>;
    mode: z.ZodEnum<{
        light: "light";
        dark: "dark";
    }>;
    colors: z.ZodArray<z.ZodObject<{
        hex: z.ZodString;
        name: z.ZodEnum<{
            success: "success";
            text: "text";
            surface: "surface";
            warning: "warning";
            border: "border";
            background: "background";
            primary: "primary";
            secondary: "secondary";
            primaryForeground: "primaryForeground";
            accent: "accent";
            destructive: "destructive";
            surfaceAlt: "surfaceAlt";
            muted: "muted";
        }>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export declare function definePaletteVariant<const TId extends string>(input: {
    id: TId;
    name: string;
    description: string;
    tags: StyleTags;
    mode: 'light' | 'dark';
    colors: ReadonlyArray<PaletteColor>;
}): PaletteVariant<PaletteVariantId<TId>>;
/**
 * Sparse per-token override map. Loaded from / persisted to
 * `site_theme_selections.palette_overrides`. Empty / null means "no overrides
 * applied; the palette variant's own colours render unchanged."
 */
export type PaletteOverrides = Readonly<Partial<Record<PaletteTokenName, HexColor>>>;
/**
 * Sparse object of known token names → hex colours. Unknown keys are
 * rejected at parse time; missing keys mean "no override for that token".
 * Built as an explicit partial-object schema (rather than `z.record(enum, …)`)
 * for unambiguous closure under Zod 4.
 */
export declare const paletteOverridesSchema: z.ZodPipe<z.ZodObject<{
    primary: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    primaryForeground: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    secondary: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    accent: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    success: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    warning: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    destructive: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    background: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    surface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    surfaceAlt: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    muted: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
    border: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
}, z.core.$strict>, z.ZodTransform<Readonly<Partial<Record<"success" | "text" | "surface" | "warning" | "border" | "background" | "primary" | "secondary" | "primaryForeground" | "accent" | "destructive" | "surfaceAlt" | "muted", HexColor>>>, {
    primary?: HexColor | undefined;
    primaryForeground?: HexColor | undefined;
    secondary?: HexColor | undefined;
    accent?: HexColor | undefined;
    success?: HexColor | undefined;
    warning?: HexColor | undefined;
    destructive?: HexColor | undefined;
    background?: HexColor | undefined;
    surface?: HexColor | undefined;
    surfaceAlt?: HexColor | undefined;
    muted?: HexColor | undefined;
    text?: HexColor | undefined;
    border?: HexColor | undefined;
}>>;
