/**
 * Block Content Validation
 *
 * Validates block data against block schemas to catch common errors:
 * - Unknown fields that will be silently dropped
 * - Missing required fields
 * - Invalid field values (wrong types, malformed structures)
 */
import type { FieldDefinition } from '../../config/types';
type BlockManifest = {
    fields: FieldDefinition[];
} & Record<string, unknown>;
export interface ValidationWarning {
    type: 'unknown_field' | 'missing_required' | 'invalid_content';
    field: string;
    message: string;
}
export interface BlockValidationResult {
    valid: boolean;
    warnings: ValidationWarning[];
    errors: ValidationWarning[];
}
/**
 * Extract all valid field IDs from a block manifest, including nested fields.
 *
 * Handles field types that contain nested fields:
 * - group: has schema.fields
 * - modal: has schema.fields
 * - repeater: has schema.fields (monomorphic) or itemTypes (polymorphic)
 * - tabGroup: has tabs[].fields
 */
export declare function extractFieldIds(fields: FieldDefinition[]): Set<string>;
/**
 * Extract required field IDs from a block manifest.
 *
 * Note: Only checks top-level required fields. Nested required fields
 * within groups/repeaters are not validated at this level since their
 * presence depends on parent field structure.
 */
export declare function extractRequiredFieldIds(fields: FieldDefinition[]): Set<string>;
/**
 * Validate block content values against the manifest schema using Zod.
 *
 * This catches type mismatches, malformed structures, and invalid values
 * that would cause runtime errors when rendering blocks.
 *
 * @param data - The block data to validate
 * @param manifest - The block manifest with field definitions
 * @param customFields - Optional custom fields from config (blockFieldExtensions)
 * @returns Array of validation warnings for invalid content
 */
export declare function validateBlockContent(data: Record<string, unknown>, manifest: BlockManifest, customFields?: FieldDefinition[]): ValidationWarning[];
/**
 * Validate block data against its manifest schema.
 *
 * Returns warnings for unknown fields (fields in data not in schema)
 * and errors for missing required fields.
 *
 * @param data - The block data to validate
 * @param manifest - The block manifest with field definitions
 * @param customFields - Optional custom fields from config (blockFieldExtensions)
 */
export declare function validateBlockData(data: Record<string, unknown>, manifest: BlockManifest, customFields?: FieldDefinition[]): BlockValidationResult;
/**
 * Format validation result for display.
 */
export declare function formatValidationResult(pageIdentifier: string, blockIdentifier: string, blockKind: string, result: BlockValidationResult): string[];
export {};
