/**
 * Enhanced Runtime Validation System - Phase 1C
 *
 * Smart error recovery, performance optimization, enhanced error reporting,
 * and component lifecycle validation for production-ready validation.
 */
import type { ComponentInstance } from '@tachui/core';
export declare class TachUIValidationError extends Error {
    context: {
        component: string;
        property?: string;
        suggestion?: string;
        documentation?: string;
        example?: {
            wrong: string;
            correct: string;
        };
        package?: string;
    };
    constructor(message: string, context: {
        component: string;
        property?: string;
        suggestion?: string;
        documentation?: string;
        example?: {
            wrong: string;
            correct: string;
        };
        package?: string;
    });
    getFormattedMessage(): string;
}
export interface ValidationConfig {
    enabled: boolean;
    errorLevel: 'off' | 'warn' | 'error';
    packages: Record<string, boolean>;
    strictMode?: boolean;
    excludeFiles?: string[];
}
/**
 * Recovery strategy for validation errors
 */
export type RecoveryStrategy = 'ignore' | 'fallback' | 'fix' | 'throw';
/**
 * Enhanced validation error with recovery options
 */
export declare class EnhancedValidationError extends TachUIValidationError {
    context: {
        component: string;
        property?: string;
        suggestion?: string;
        documentation?: string;
        example?: {
            wrong: string;
            correct: string;
        };
        package?: string;
        recoveryStrategy?: RecoveryStrategy;
        fallbackValue?: any;
        autoFix?: () => any;
    };
    constructor(message: string, context: {
        component: string;
        property?: string;
        suggestion?: string;
        documentation?: string;
        example?: {
            wrong: string;
            correct: string;
        };
        package?: string;
        recoveryStrategy?: RecoveryStrategy;
        fallbackValue?: any;
        autoFix?: () => any;
    });
    /**
     * Get recovery strategy with proper typing
     */
    private getRecoveryStrategyFromContext;
    /**
     * Get fallback value with proper typing
     */
    private getFallbackValueFromContext;
    /**
     * Get auto fix with proper typing
     */
    private getAutoFixFromContext;
    /**
     * Get suggested recovery action
     */
    getRecoveryStrategy(): RecoveryStrategy;
    /**
     * Get fallback value for graceful degradation
     */
    getFallbackValue(): any;
    /**
     * Apply automatic fix if available
     */
    applyAutoFix(): any;
    /**
     * Enhanced formatted message with recovery options
     */
    getFormattedMessage(): string;
}
/**
 * Enhanced validation configuration
 */
export interface EnhancedValidationConfig extends ValidationConfig {
    performance: {
        enableCaching: boolean;
        maxCacheSize: number;
        performanceThreshold: number;
    };
    recovery: {
        enableRecovery: boolean;
        defaultStrategy: RecoveryStrategy;
        maxRecoveryAttempts: number;
    };
    lifecycle: {
        validateOnMount: boolean;
        validateOnUpdate: boolean;
        validateOnUnmount: boolean;
    };
    reporting: {
        enhancedMessages: boolean;
        includeStackTrace: boolean;
        reportToConsole: boolean;
        reportToExternal?: (error: EnhancedValidationError) => void;
    };
}
/**
 * Global enhanced validation configuration
 */
declare let enhancedConfig: EnhancedValidationConfig;
/**
 * Validation cache for performance optimization
 */
declare class ValidationCache {
    private cache;
    private maxSize;
    private ttl;
    constructor(maxSize?: number);
    get(key: string): boolean | null;
    set(key: string, result: boolean): void;
    clear(): void;
    getSize(): number;
}
/**
 * Performance monitor for validation overhead
 */
declare class ValidationPerformanceMonitor {
    private measurements;
    private maxMeasurements;
    startMeasurement(): () => void;
    private recordMeasurement;
    getAverageTime(): number;
    isPerformanceAcceptable(): boolean;
    getStats(): {
        averageTime: number;
        measurements: number;
        acceptable: boolean;
        threshold: number;
    };
    reset(): void;
}
declare const validationCache: ValidationCache;
declare const performanceMonitor: ValidationPerformanceMonitor;
/**
 * Configure enhanced validation
 */
export declare function configureEnhancedValidation(config: Partial<EnhancedValidationConfig>): void;
/**
 * Check if enhanced validation is enabled
 */
export declare function isEnhancedValidationEnabled(): boolean;
/**
 * Smart validation executor with error recovery
 */
export declare class SmartValidationExecutor {
    private recoveryAttempts;
    /**
     * Execute validation with recovery options
     */
    executeWithRecovery<T>(validationKey: string, validator: () => T, recoveryOptions?: {
        strategy?: RecoveryStrategy;
        fallbackValue?: T;
        autoFix?: () => T;
    }): T;
    /**
     * Handle validation error with recovery
     */
    private handleValidationError;
    /**
     * Report validation error
     */
    private reportError;
    /**
     * Reset recovery attempts
     */
    resetRecoveryAttempts(): void;
    /**
     * Get recovery stats
     */
    getRecoveryStats(): {
        totalAttempts: number;
        keysWithAttempts: number;
        attempts: {
            [k: string]: number;
        };
    };
}
declare const smartValidator: SmartValidationExecutor;
/**
 * Component lifecycle validator
 */
export declare class ComponentLifecycleValidator {
    private mountedComponents;
    private componentStates;
    /**
     * Validate component on mount
     */
    validateOnMount(component: ComponentInstance, props: any): void;
    /**
     * Validate component on update
     */
    validateOnUpdate(component: ComponentInstance, newProps: any, oldProps: any): void;
    /**
     * Validate component on unmount
     */
    validateOnUnmount(component: ComponentInstance): void;
    /**
     * Get lifecycle validation stats
     */
    getStats(): {
        mountedComponents: number;
        enabled: {
            validateOnMount: boolean;
            validateOnUpdate: boolean;
            validateOnUnmount: boolean;
        };
        config: {
            validateOnMount: boolean;
            validateOnUpdate: boolean;
            validateOnUnmount: boolean;
        };
    };
}
declare const lifecycleValidator: ComponentLifecycleValidator;
/**
 * Enhanced validation utilities
 */
export declare const EnhancedValidationUtils: {
    /**
     * Configure enhanced validation
     */
    configure: typeof configureEnhancedValidation;
    /**
     * Get performance statistics
     */
    getPerformanceStats(): {
        monitor: {
            averageTime: number;
            measurements: number;
            acceptable: boolean;
            threshold: number;
        };
        cache: {
            size: number;
            maxSize: number;
        };
        recovery: {
            totalAttempts: number;
            keysWithAttempts: number;
            attempts: {
                [k: string]: number;
            };
        };
        lifecycle: {
            mountedComponents: number;
            enabled: {
                validateOnMount: boolean;
                validateOnUpdate: boolean;
                validateOnUnmount: boolean;
            };
            config: {
                validateOnMount: boolean;
                validateOnUpdate: boolean;
                validateOnUnmount: boolean;
            };
        };
    };
    /**
     * Reset all caches and stats
     */
    reset(): void;
    /**
     * Test enhanced validation system
     */
    test(): void;
    /**
     * Enable production bypass mode
     */
    enableProductionBypass(): void;
    /**
     * Create validated component with enhanced features
     */
    createEnhancedValidatedComponent<T extends ComponentInstance>(originalConstructor: (...args: any[]) => T, validator: (args: unknown[]) => void, componentType: string, packageName?: string): (...args: any[]) => T;
};
export { smartValidator, lifecycleValidator, validationCache, performanceMonitor, enhancedConfig, };
//# sourceMappingURL=enhanced-runtime.d.ts.map