import { FutureAwareContainer, FutureContainer, IFutureModel, MultiFutureAware } from './future-types';

/**
 * Future handler for managing multiple concurrent long-running operations.
 *
 * Provides comprehensive lifecycle management for models that coordinate multiple
 * device operations simultaneously. Each Future is tracked with its own alias
 * and receives automatic progress updates and cleanup when operations complete.
 *
 * @example Managing Multiple Operations
 * ```typescript
 * @kosModel("device-maintenance-model")
 * export class DeviceMaintenanceModel implements FutureContainer {
 *   futureHandler: MultipleFutureHandler;
 *
 *   constructor(modelId: string, options: any, context: KosCreationContext) {
 *     this.id = modelId;
 *     this.futureHandler = new MultipleFutureHandler(this);
 *   }
 *
 *   async startCalibration(deviceId: string): Promise<CalibrationResult> {
 *     const future = await this.createFuture('/device/calibrate', { deviceId });
 *     this.futureHandler.addFuture(future, `calibration-${deviceId}`);
 *     return future;
 *   }
 *
 *   async startCleaning(deviceId: string): Promise<CleaningResult> {
 *     const future = await this.createFuture('/device/clean', { deviceId });
 *     this.futureHandler.addFuture(future, `cleaning-${deviceId}`);
 *     return future;
 *   }
 *
 *   onFutureUpdate(future: IFutureModel): void {
 *     // Handle progress updates from any managed Future
 *     console.log(`${future.id}: ${future.progress}% complete`);
 *   }
 * }
 * ```
 *
 * @group KOS Model
 * @category Asynchronous Operations
 */
export declare class MultipleFutureHandler<T extends {} = Record<string, unknown>> implements FutureAwareContainer<T>, MultiFutureAware<T> {
    private futures;
    private defaultContext;
    private context;
    private disposers;
    private container?;
    constructor(container?: FutureContainer<T>, defaultContext?: string);
    get allFutures(): IFutureModel<T>[];
    get future(): IFutureModel<T> | undefined;
    addFuture(future: IFutureModel<T>, alias?: string): void;
    removeFuture(alias?: string): void;
    getFuture(alias?: string): IFutureModel<T> | undefined;
    get futureMap(): Map<string, IFutureModel<T>>;
}
/**
 * Future handler for managing single long-running operations with simplified API.
 *
 * Provides streamlined lifecycle management for models that typically handle
 * one operation at a time. Automatically tracks progress and provides reactive
 * status information for UI integration.
 *
 * @example Single Operation Management
 * ```typescript
 * @kosModel("brewing-system-model")
 * export class BrewingSystemModel implements FutureContainer {
 *   futureHandler: FutureHandler;
 *
 *   constructor(modelId: string, options: any, context: KosCreationContext) {
 *     this.id = modelId;
 *     this.futureHandler = new FutureHandler(this);
 *   }
 *
 *   async startBrewingCycle(recipe: Recipe): Promise<BrewingResult> {
 *     const future = await this.createFuture('/brewing/start', { recipe });
 *     this.futureHandler.addFuture(future);
 *     return future;
 *   }
 *
 *   get isOperationActive(): boolean {
 *     return this.futureHandler.status !== 'NOT_RESOLVED';
 *   }
 *
 *   get operationProgress(): number {
 *     return this.futureHandler.progress;
 *   }
 *
 *   onFutureUpdate(future: IFutureModel): void {
 *     // Handle progress updates from the active Future
 *     console.log(`Brewing: ${future.progress}% complete`);
 *   }
 * }
 * ```
 *
 * @group KOS Model
 * @category Asynchronous Operations
 */
export declare class FutureHandler<T extends object = Record<string, unknown>> implements FutureAwareContainer<T> {
    private disposer?;
    private _future?;
    private container?;
    constructor(container?: FutureContainer<T>);
    removeFuture(): void;
    get future(): IFutureModel<T> | undefined;
    getFuture(): IFutureModel<T> | undefined;
    addFuture(future: IFutureModel<T>): void;
    onFutureUpdate?: ((future: IFutureModel<T>) => void) | undefined;
    get allFutures(): IFutureModel<T>[];
    get timeRemaining(): string;
    get status(): string;
    get progress(): number;
    cancel(): Promise<void>;
}
//# sourceMappingURL=future-aware.d.ts.map