import { type NonEmptyReadonlyArray, type PageContentVersionId } from './types';
/** Preview surface being inspected before authority/style compatibility is applied. */
export type DesignCustomizationSurface = Readonly<{
    kind: 'managed-macadamia';
}> | Readonly<{
    kind: 'sdk-external';
    reason: 'sdk-managed-page' | 'external-preview-url' | 'sdk-custom-block';
}> | Readonly<{
    kind: 'unsupported';
    reason: 'unsupported-page-kind' | 'missing-page-edit-permission';
}>;
/** Page design/style authority state used to decide whether normal customization can mount. */
export type DesignCustomizationAuthority = Readonly<{
    kind: 'canonical-theme-v2';
    pageVersionId: PageContentVersionId;
}> | Readonly<{
    kind: 'absent-theme-v2';
}> | Readonly<{
    kind: 'invalid-theme-v2';
}> | Readonly<{
    kind: 'legacy-raw';
}> | Readonly<{
    kind: 'advanced-detached';
}> | Readonly<{
    kind: 'mixed-authority';
}>;
export type DesignCustomizationUnsupportedReason = Extract<DesignCustomizationSurface, {
    kind: 'unsupported';
}>['reason'] | 'invalid-page-design-state' | 'mixed-style-authority';
/** Closed mount decision for the normal Macadamia preview customizer. */
export type DesignCustomizationScope = Readonly<{
    kind: 'managed-theme-v2';
    authority: Extract<DesignCustomizationAuthority, {
        kind: 'canonical-theme-v2' | 'absent-theme-v2';
    }>;
}> | Readonly<{
    kind: 'sdk-external';
    reason: Extract<DesignCustomizationSurface, {
        kind: 'sdk-external';
    }>['reason'];
}> | Readonly<{
    kind: 'legacy-raw';
}> | Readonly<{
    kind: 'advanced-detached';
}> | Readonly<{
    kind: 'unsupported';
    reason: DesignCustomizationUnsupportedReason;
}>;
export declare function deriveDesignCustomizationScope(input: Readonly<{
    surface: DesignCustomizationSurface;
    authority: DesignCustomizationAuthority;
}>): DesignCustomizationScope;
/** Typed non-cycleable option reasons; UI copy is keyed, not inferred from strings. */
export type DesignOptionIssue = Readonly<{
    kind: 'requires-setup';
    messageKey: string;
}> | Readonly<{
    kind: 'incompatible';
    messageKey: string;
}> | Readonly<{
    kind: 'unsupported-scope';
    messageKey: string;
    scope: Exclude<DesignCustomizationScope, {
        kind: 'managed-theme-v2';
    }>;
}> | Readonly<{
    kind: 'blocked-authority';
    messageKey: string;
    scope: Extract<DesignCustomizationScope, {
        kind: 'legacy-raw' | 'advanced-detached';
    }>;
}>;
/** Resolver output for one visual option before the UI narrows to cycleable choices. */
export type ResolvedDesignOption<TId, TIssue = DesignOptionIssue> = Readonly<{
    kind: 'recommended';
    id: TId;
    messageKey: 'design.option.recommended';
}> | Readonly<{
    kind: 'available';
    id: TId;
    label: string;
}> | Readonly<{
    kind: 'requires-setup';
    id: TId;
    label: string;
    issue: TIssue;
}> | Readonly<{
    kind: 'incompatible';
    id: TId;
    label: string;
    issue: TIssue;
}> | Readonly<{
    kind: 'unsupported-scope';
    issue: TIssue;
}> | Readonly<{
    kind: 'blocked-authority';
    issue: TIssue;
}>;
/** Options the preview UI may cycle through directly. */
export type CycleableDesignOption<TId, TIssue = DesignOptionIssue> = Extract<ResolvedDesignOption<TId, TIssue>, {
    kind: 'available' | 'recommended';
}>;
export type CycleableOptions<TId, TIssue = DesignOptionIssue> = NonEmptyReadonlyArray<CycleableDesignOption<TId, TIssue>>;
export declare function recommendedDesignOption<TId>(id: TId): Extract<ResolvedDesignOption<TId>, {
    kind: 'recommended';
}>;
export declare function cycleableOptionsFromResolved<TId, TIssue>(options: readonly ResolvedDesignOption<TId, TIssue>[]): CycleableOptions<TId, TIssue> | null;
