import { Context, ContextState, ContextTransition } from '../Types'; import { EventEmitter } from '../utils/EventEmitter'; import { Logger } from '../Logger'; import { ErrorHandler } from '../ui/ErrorHandler'; export declare class MultiContextObject extends EventEmitter { protected contexts: Map; protected currentContext: Context; protected transitionInProgress: boolean; protected logger: Logger; protected errorHandler: ErrorHandler; constructor(contexts: Context[]); private detectContext; private setupContextListeners; private handleBeforeContextSwitch; private handleAfterContextSwitch; private handleContextError; private activateContext; private deactivateContext; isValidContext(context: Context): boolean; getCurrentContext(): Context; getContextState(context: Context): ContextState | undefined; setContextData(context: Context, key: string, value: any): void; getContextData(context: Context, key: string): any; switchContext(newContext: Context): Promise; executeInContext(context: Context, func: () => Promise | T): Promise; executeInAllContexts(func: (context: Context) => Promise | T): Promise>; executeInMultipleContexts(contexts: Context[], func: (context: Context) => Promise | T): Promise>; onContextActivated(callback: (context: Context) => void): void; onContextDeactivated(callback: (context: Context) => void): void; onBeforeContextSwitch(callback: (transition: ContextTransition) => void): void; onAfterContextSwitch(callback: (transition: ContextTransition) => void): void; withContext(context: Context, func: () => Promise | T): Promise; isContextActive(context: Context): boolean; getActiveContexts(): Context[]; broadcastToActiveContexts(func: (context: Context) => Promise | T): Promise>; }