/**
 * Translation validation utilities.
 *
 * Provides functions to validate translation specs, check for
 * missing translations, and validate ICU message format.
 *
 * @module translations/validation
 *
 * @example
 * ```typescript
 * import {
 *   validateTranslationSpec,
 *   findMissingTranslations,
 *   validateICUFormat
 * } from '@contractspec/lib.contracts-spec';
 *
 * // Validate a translation spec
 * const result = validateTranslationSpec(myTranslation);
 *
 * // Find missing translations between locales
 * const missing = findMissingTranslations(englishSpec, frenchSpec);
 *
 * // Validate ICU message format
 * const icuResult = validateICUFormat('{count, plural, one {item} other {items}}');
 * ```
 */
import type { TranslationRegistry } from './registry';
import type { Locale, MessageKey, TranslationMessage, TranslationSpec } from './spec';
export type TranslationValidationLevel = 'error' | 'warning' | 'info';
export interface TranslationValidationIssue {
    level: TranslationValidationLevel;
    message: string;
    path?: string;
    context?: Record<string, unknown>;
}
export interface TranslationValidationResult {
    valid: boolean;
    issues: TranslationValidationIssue[];
}
export interface ICUValidationResult {
    valid: boolean;
    error?: string;
    placeholders: string[];
    plurals: string[];
    selects: string[];
}
export interface MissingTranslation {
    messageKey: MessageKey;
    sourceLocale: Locale;
    targetLocale: Locale;
    sourceMessage: TranslationMessage;
}
/**
 * Validate a translation spec for internal consistency.
 *
 * @param spec - Translation spec to validate
 * @returns Validation result with any issues found
 */
export declare function validateTranslationSpec(spec: TranslationSpec): TranslationValidationResult;
/**
 * Validate ICU message format syntax.
 *
 * This is a simplified validator that checks for balanced braces
 * and extracts placeholders, plurals, and selects.
 *
 * @param message - Message string to validate
 * @returns Validation result with extracted components
 */
export declare function validateICUFormat(message: string): ICUValidationResult;
/**
 * Find messages that exist in source but not in target.
 *
 * @param sourceSpec - Source translation spec (usually base locale like 'en')
 * @param targetSpec - Target translation spec to check
 * @returns Array of missing translations
 */
export declare function findMissingTranslations(sourceSpec: TranslationSpec, targetSpec: TranslationSpec): MissingTranslation[];
/**
 * Find all missing translations across a registry.
 *
 * Compares each locale against a base locale to find missing keys.
 *
 * @param registry - Translation registry
 * @param specKey - Translation spec key to check
 * @param baseLocale - Base locale to compare against
 * @returns Map of locale to missing translations
 */
export declare function findAllMissingTranslations(registry: TranslationRegistry, specKey: string, baseLocale: Locale): Map<Locale, MissingTranslation[]>;
/**
 * Validate all translation specs in a registry.
 *
 * @param registry - Translation registry to validate
 * @returns Validation result
 */
export declare function validateTranslationRegistry(registry: TranslationRegistry): TranslationValidationResult;
export declare class TranslationValidationError extends Error {
    readonly issues: TranslationValidationIssue[];
    constructor(message: string, issues: TranslationValidationIssue[]);
}
/**
 * Assert that a translation spec is valid, throwing if not.
 *
 * @param spec - Translation spec to validate
 * @throws {TranslationValidationError} If validation fails
 */
export declare function assertTranslationSpecValid(spec: TranslationSpec): void;
