export interface IEventBus {
    on: (eventType: string, callback: (...args: any[]) => void) => void;
    off: (eventType: string, callback?: (...args: any[]) => void) => void;
    emit: (eventType: string, ...args: any[]) => void;
    once: (eventType: string, callback: (...args: any[]) => void) => void;
    removeAllListeners: (eventType?: string) => void;
    listenerCount: (eventType: string) => number;
}
export interface IEventManager<T extends Record<string, any>> {
    on: <K extends keyof T>(type: K, callback: (event: T[K]) => void) => void;
    off: <K extends keyof T>(type: K, callback?: (event: T[K]) => void) => void;
    emit: <K extends keyof T>(type: K, event: T[K]) => void;
    clearAllListeners: () => void;
    getListenerCount: (type?: keyof T) => number;
}
export interface IEventSource {
    getEventBus: () => IEventBus;
}
export interface IWorksheetEventSource extends IEventSource {
    readonly sheetKey: string;
    readonly sheetTitle: string;
    readonly tableInstance?: any;
}
export interface ISpreadsheetEventSource extends IEventSource {
    readonly workSheetInstances: Map<string, IWorksheetEventSource>;
}
export interface IEventValidator<T = any> {
    validate: (event: T) => boolean;
    getErrorMessage: (event: T) => string;
}
export interface EventManagerConfig {
    enableValidation?: boolean;
    enablePerformanceMonitoring?: boolean;
    maxListeners?: number;
    enableErrorBoundary?: boolean;
}
export interface EventStatistics {
    totalEvents: number;
    listenersByType: Record<string, number>;
    performanceMetrics?: Record<string, {
        avgDuration: number;
        maxDuration: number;
        minDuration: number;
        callCount: number;
    }>;
}
