/**
 * Advanced UI Cache with Invalidation Strategies
 * Intelligent caching for UI elements with state tracking
 */
import { EventEmitter } from 'events';
export interface UIElement {
    id: string;
    x: number;
    y: number;
    width?: number;
    height?: number;
    type?: string;
    text?: string;
    state?: 'enabled' | 'disabled' | 'hidden' | 'visible';
    lastAccessed: number;
    lastModified: number;
    accessCount: number;
    confidence: number;
}
export interface CacheStats {
    hits: number;
    misses: number;
    evictions: number;
    invalidations: number;
    hitRate: number;
    averageAge: number;
    totalElements: number;
}
export interface InvalidationRule {
    type: 'time' | 'event' | 'state' | 'frequency' | 'confidence';
    condition: any;
    action: 'invalidate' | 'refresh' | 'downgrade';
}
export declare class AdvancedUICache extends EventEmitter {
    private cache;
    private stats;
    private invalidationRules;
    private readonly MAX_CACHE_SIZE;
    private readonly DEFAULT_TTL;
    private readonly EXTENDED_TTL;
    private stateMonitor;
    private applicationStates;
    constructor();
    /**
     * Get cached element with intelligent invalidation
     */
    get(elementId: string): UIElement | null;
    /**
     * Set element in cache with intelligent TTL
     */
    set(elementId: string, element: Partial<UIElement>): void;
    /**
     * Batch set multiple elements
     */
    setBatch(elements: Array<{
        id: string;
        element: Partial<UIElement>;
    }>): void;
    /**
     * Invalidate element
     */
    invalidate(elementId: string): void;
    /**
     * Invalidate elements by pattern
     */
    invalidatePattern(pattern: RegExp): number;
    /**
     * Refresh element with new confidence
     */
    refresh(elementId: string, updates: Partial<UIElement>): void;
    /**
     * Check if element should be invalidated
     */
    private shouldInvalidate;
    /**
     * Evict least recently used element
     */
    private evictLRU;
    /**
     * Calculate initial confidence score
     */
    private calculateInitialConfidence;
    /**
     * Check if application state has changed
     */
    private hasStateChanged;
    /**
     * Start monitoring application state for intelligent invalidation
     */
    private startStateMonitoring;
    /**
     * Check application states and invalidate affected elements
     */
    private checkApplicationStates;
    /**
     * Update hit rate statistics
     */
    private updateHitRate;
    /**
     * Get cache statistics
     */
    getStats(): CacheStats;
    /**
     * Clear entire cache
     */
    clear(): void;
    /**
     * Get cache summary
     */
    getSummary(): string;
    /**
     * Export cache for persistence
     */
    export(): string;
    /**
     * Import cache from persistence
     */
    import(data: string): void;
    /**
     * Cleanup resources
     */
    destroy(): void;
}
export declare const uiCache: AdvancedUICache;
//# sourceMappingURL=advanced-ui-cache.d.ts.map