/**
 * Pass 2: Content Population
 *
 * Extract content from HTML sections and populate block fields.
 * For built-in blocks, extract values that map to block fields.
 * For custom blocks, delegate to the existing three-pass converter.
 */
import type { Theme, CustomCssRuleInput, CustomCssAtRuleInput } from '../../contracts';
import type { SdkCustomBlock } from '../../config/types';
import type { SectionMatch, BlockSummaryForLLM, PageBlock, ContentTypeSummary, EntryConfig, ContentTypeConfig } from '../types';
import type { DebugWriter } from '../../manifest/debug';
import type { AiRuntime } from '../../ai/runtime';
/**
 * Sanitize a box styles field to only include allowed properties.
 * Returns a cleaned object, or null if the input was invalid.
 */
declare function sanitizeBoxStylesContent(content: unknown, fieldId: string): Record<string, unknown> | null;
/**
 * Sanitize extracted content to fix common LLM mistakes.
 * - Strips invalid properties from box styles fields
 */
declare function sanitizeExtractedContent(content: Record<string, unknown>): Record<string, unknown>;
/**
 * Check if a field is a box styles field (_sectionStyles, _containerStyles, _cardStyles).
 */
declare function isBoxStylesField(fieldId: string): boolean;
interface PopulationContext {
    ai: AiRuntime;
    model: string;
    temperature: number;
    theme: Theme;
    debug: DebugWriter;
    maxRetries: number;
    onProgress?: (message: string) => void;
    debugDir?: string;
    /** Available content types for custom block conversion */
    availableContentTypes?: ContentTypeSummary[];
}
interface CustomBlockWithCss extends SdkCustomBlock {
    customCssRules?: CustomCssRuleInput[];
    customCssAtRules?: CustomCssAtRuleInput[];
}
interface PopulationResult {
    success: true;
    blocks: PageBlock[];
    customBlocks: CustomBlockWithCss[];
    /** Content entries extracted from custom blocks */
    entries?: EntryConfig[];
    /** Custom content types created by custom blocks */
    contentTypes?: ContentTypeConfig[];
}
interface PopulationFailure {
    success: false;
    error: string;
    partialBlocks?: PageBlock[];
}
/**
 * Populate content for all matched sections.
 * Takes the new combined SectionMatch array from Pass 1.
 */
export declare function populateBlockContent(sections: SectionMatch[], availableBlocks: BlockSummaryForLLM[], ctx: PopulationContext): Promise<PopulationResult | PopulationFailure>;
/**
 * Export internal functions for testing.
 * These are not part of the public API.
 * @internal
 */
export declare const __testing: {
    isBoxStylesField: typeof isBoxStylesField;
    sanitizeBoxStylesContent: typeof sanitizeBoxStylesContent;
    sanitizeExtractedContent: typeof sanitizeExtractedContent;
    SECTION_STYLES_ALLOWED_KEYS: Set<string>;
    BOX_STYLES_ALLOWED_KEYS: Set<string>;
    ALLOWED_SPACING_VALUES: Set<string>;
    ALLOWED_ROUNDED_VALUES: Set<string>;
};
export {};
