import { type DesignBlockId } from './types';
export type SiteChromeCustomizableSurface = Readonly<{
    kind: 'site-header';
}> | Readonly<{
    kind: 'site-footer';
}>;
export type BlockCustomizableSurface = Readonly<{
    kind: 'block';
    blockId: DesignBlockId;
    blockKind: string;
}>;
export type CustomizableSurface = BlockCustomizableSurface | SiteChromeCustomizableSurface;
export type SiteChromePersistenceSurface = 'header' | 'footer';
export type LookPersistenceTarget = Readonly<{
    kind: 'page-design';
    blockId: DesignBlockId;
}> | Readonly<{
    kind: 'site-chrome';
    surface: SiteChromePersistenceSurface;
}>;
export type PreviewLookCustomizationCommand<TLookId> = Readonly<{
    kind: 'inspect';
    surface: CustomizableSurface;
}> | Readonly<{
    kind: 'cycle';
    surface: CustomizableSurface;
    direction: 'previous' | 'next';
}> | Readonly<{
    kind: 'select';
    surface: CustomizableSurface;
    lookId: TLookId;
}> | Readonly<{
    kind: 'clear';
    surface: CustomizableSurface;
}>;
export type LookCustomizationWritePlan<TLookId> = Readonly<{
    kind: 'no-write';
    command: 'inspect' | 'cycle';
}> | Readonly<{
    kind: 'write-selection';
    target: LookPersistenceTarget;
    lookId: TLookId;
}> | Readonly<{
    kind: 'clear-selection';
    target: LookPersistenceTarget;
}>;
export type SiteChromeLookRejection<TLookId, TReason> = Readonly<{
    lookId: TLookId;
    reasons: readonly TReason[];
}>;
export type SiteChromeLookDiagnostics<TLookId, TReason> = Readonly<{
    surface: SiteChromeCustomizableSurface;
    selectedLookId: TLookId;
    rejected: readonly SiteChromeLookRejection<TLookId, TReason>[];
}>;
export type LookCustomizationOption<TLookId, TIssue> = Readonly<{
    kind: 'available';
    lookId: TLookId;
    label: string;
}> | Readonly<{
    kind: 'selected';
    lookId: TLookId;
    label: string;
}> | Readonly<{
    kind: 'unavailable';
    lookId: TLookId;
    label: string;
    issue: TIssue;
}>;
export type LookCustomizationAdapterSnapshot<TSurface extends CustomizableSurface, TLookId, TIssue> = Readonly<{
    surface: TSurface;
    selectedLookId: TLookId | null;
    options: readonly LookCustomizationOption<TLookId, TIssue>[];
}>;
export declare function uniqueLookIds<TLookId>(ids: readonly TLookId[]): readonly TLookId[];
export type ResolvedLook<TLookId, TLook, TReason, TCompiled> = Readonly<{
    selectedLookId: TLookId;
    selectedLook: TLook;
    compiled: TCompiled;
    rejected: readonly SiteChromeLookRejection<TLookId, TReason>[];
}>;
export declare function resolveLook<TLookId, TLook extends Readonly<{
    id: TLookId;
}>, TContext, TReason, TCompiled>(input: Readonly<{
    recommendedLookIds: readonly TLookId[];
    guaranteedFallbackLookId: TLookId;
    getLookOrThrow: (lookId: TLookId) => TLook;
    context: TContext;
    rejectReasonsForLook: (look: TLook, context: TContext) => readonly TReason[];
    compileLook: (look: TLook) => TCompiled;
}>): ResolvedLook<TLookId, TLook, TReason, TCompiled>;
export declare function mergeWithDefaults<TValue extends Readonly<Record<string, unknown>>>(defaults: TValue, partial: Partial<TValue> | undefined): TValue;
export declare function persistenceTargetForSurface(surface: CustomizableSurface): LookPersistenceTarget;
export declare function writePlanForLookCustomizationCommand<TLookId>(command: PreviewLookCustomizationCommand<TLookId>): LookCustomizationWritePlan<TLookId>;
