/**
 * Development Tools System
 *
 * Comprehensive debugging and development tools for TachUI.
 * Provides component tree inspection, performance analysis,
 * and runtime debugging capabilities.
 */
import type { ComponentInstance } from '@tachui/core';
/**
 * Component tree node for debugging
 */
export interface ComponentTreeNode {
    id: string;
    name: string;
    type: 'component' | 'element' | 'text' | 'fragment';
    props: Record<string, any>;
    children: ComponentTreeNode[];
    parent: ComponentTreeNode | null;
    depth: number;
    renderCount: number;
    lastRenderTime: number;
    memoryUsage: number;
    warnings: string[];
    errors: string[];
}
/**
 * Development environment state
 */
export interface DevState {
    enabled: boolean;
    performanceTracking: boolean;
    componentInspection: boolean;
    reactiveDebugging: boolean;
    memoryTracking: boolean;
    warningsEnabled: boolean;
    logLevel: 'error' | 'warn' | 'info' | 'debug';
}
/**
 * Development tools configuration
 */
export interface DevToolsConfig {
    autoEnable: boolean;
    trackAllComponents: boolean;
    trackMemoryUsage: boolean;
    enableWarnings: boolean;
    enableErrors: boolean;
    maxTreeDepth: number;
    updateInterval: number;
}
/**
 * Runtime debugging event
 */
export interface DebugEvent {
    type: 'component_mount' | 'component_unmount' | 'component_update' | 'reactive_create' | 'reactive_update' | 'context_change' | 'performance_warning' | 'error';
    timestamp: number;
    componentId?: string;
    componentName?: string;
    data: any;
    stack?: string;
}
/**
 * Development tools manager
 */
export declare class DevTools {
    private static instance;
    private config;
    private state;
    private componentTree;
    private componentRegistry;
    private debugEvents;
    private activeComponents;
    private treeSignal;
    private setTree;
    private eventsSignal;
    private setEvents;
    private stateSignal;
    private setState;
    private updateTimer;
    constructor();
    static getInstance(): DevTools;
    /**
     * Configure development tools
     */
    configure(config: Partial<DevToolsConfig>): void;
    /**
     * Enable development tools
     */
    enable(): void;
    /**
     * Disable development tools
     */
    disable(): void;
    /**
     * Check if dev tools are enabled
     */
    isEnabled(): boolean;
    /**
     * Register a component instance
     */
    registerComponent(componentId: string, instance: ComponentInstance, parentId?: string): void;
    /**
     * Unregister a component instance
     */
    unregisterComponent(componentId: string): void;
    /**
     * Update component data
     */
    updateComponent(componentId: string, updates: Partial<ComponentTreeNode>): void;
    /**
     * Track reactive operation
     */
    trackReactiveOperation(type: string, operation: string, componentId?: string): void;
    /**
     * Track context changes
     */
    trackContextChange(contextName: string, newValue: any, componentId?: string): void;
    /**
     * Add warning to component
     */
    addWarning(componentId: string, message: string): void;
    /**
     * Add error to component
     */
    addError(componentId: string, error: Error | string): void;
    /**
     * Get component tree
     */
    getComponentTree(): Map<string, ComponentTreeNode>;
    /**
     * Get component tree signal
     */
    getComponentTreeSignal(): () => Map<string, ComponentTreeNode>;
    /**
     * Get root components
     */
    getRootComponents(): ComponentTreeNode[];
    /**
     * Get component by ID
     */
    getComponent(componentId: string): ComponentTreeNode | undefined;
    /**
     * Find components by name
     */
    findComponentsByName(name: string): ComponentTreeNode[];
    /**
     * Get debug events
     */
    getDebugEvents(): DebugEvent[];
    /**
     * Get debug events signal
     */
    getDebugEventsSignal(): () => DebugEvent[];
    /**
     * Get development state
     */
    getDevState(): DevState;
    /**
     * Get development state signal
     */
    getDevStateSignal(): () => DevState;
    /**
     * Get performance summary
     */
    getPerformanceSummary(): {
        componentCount: number;
        averageRenderTime: number;
        memoryUsage: number;
        warningCount: number;
        errorCount: number;
        slowComponents: {
            id: string;
            name: string;
            renderTime: number;
        }[];
    };
    /**
     * Export debug data
     */
    exportDebugData(): string;
    /**
     * Clear debug data
     */
    clear(): void;
    private getComponentName;
    private removeNodeAndDescendants;
    private addDebugEvent;
    private startUpdateTimer;
    private stopUpdateTimer;
    private updateComponentMetrics;
}
/**
 * Global dev tools instance
 */
export declare const globalDevTools: DevTools;
/**
 * Enable performance tracking
 */
export declare function enablePerformanceTracking(): void;
/**
 * Get component tree
 */
export declare function getComponentTree(): Map<string, ComponentTreeNode>;
/**
 * Enable development mode with full debugging
 */
export declare function enableDevelopmentMode(config?: Partial<DevToolsConfig>): void;
/**
 * Get development tools instance
 */
export declare function getDevTools(): DevTools;
/**
 * Development utilities
 */
export declare const devUtils: {
    /**
     * Log component tree to console
     */
    logComponentTree(): void;
    /**
     * Log performance summary
     */
    logPerformanceSummary(): void;
    /**
     * Find component by name
     */
    findComponent(name: string): ComponentTreeNode[];
    /**
     * Inspect component
     */
    inspectComponent(componentId: string): ComponentTreeNode | undefined;
};
//# sourceMappingURL=index.d.ts.map