import { FutureAwareContainer, IFutureModel } from '../../../models/models/future/future-types';
/**
 * @kosService core.future-aware
 * @kosApiLevel 13
 */
export interface KosFutureAwareOptions {
    /** Setup mode: 'full' includes all UI properties, 'minimal' only futureHandler. Default: 'full' */
    mode?: "full" | "minimal";
    /** Custom futureHandler property name. Default: 'futureHandler' */
    handlerProperty?: string;
}
/**
 * Interface for models using @kosFutureAware in minimal mode.
 * Use TypeScript interface merging to add the futureHandler property to your model class.
 *
 * @example
 * Add ESLint disable comment at top of file, then:
 * ```typescript
 * interface BackgroundServiceModelImpl extends KosFutureAwareMinimal {}
 *
 * kosFutureAware({ mode: 'minimal' })
 * class BackgroundServiceModelImpl implements IKosDataModel {
 *   // futureHandler is now available via interface merging
 * }
 * ```
 *
 * @kosService core.future-aware
 * @kosApiLevel 13
 */
export interface KosFutureAwareMinimal<T extends object = Record<string, unknown>> {
    /**
     * Core future management container that handles Future lifecycle operations.
     * Provides methods to add, remove, and query Future instances.
     * Automatically injected by @kosFutureAware decorator.
     */
    futureHandler: FutureAwareContainer<T>;
}
/**
 * Interface for models using @kosFutureAware in full mode (default).
 * Use TypeScript interface merging to add all Future Container properties to your model class.
 *
 * @example
 * Add ESLint disable comment at top of file, then:
 * ```typescript
 * interface CopyLogsModelImpl extends KosFutureAwareFull<CopyProgress> {}
 *
 * kosFutureAware() // defaults to full mode
 * class CopyLogsModelImpl implements IKosDataModel {
 *   // All Future Container properties are now available automatically
 *
 *   onFutureUpdate?(future: IFutureModel<CopyProgress>): void {
 *     // Access typed clientData
 *   }
 * }
 * ```
 *
 * @kosService core.future-aware
 * @kosApiLevel 13
 */
export interface KosFutureAwareFull<T extends object = Record<string, unknown>> extends KosFutureAwareMinimal<T> {
    /**
     * Current active Future model instance containing operation details.
     * Undefined when no operation is active. Automatically updated when
     * operations start, progress, complete, or fail.
     */
    future?: IFutureModel<T>;
    /**
     * Current operation progress as a percentage (0-100).
     * Returns 0 when no Future is active. Updates automatically as the
     * Future operation progresses via WebSocket events.
     */
    progress: number;
    /**
     * Current operation status string representation.
     * Common values: "IDLE", "IN_PROGRESS", "SUCCESS", "ERROR", "CANCELLED".
     * Returns "IDLE" when no Future is active.
     */
    status: string;
    /**
     * Whether an operation is currently actively executing.
     * True when Future exists and has not reached an end state.
     * False when no Future exists or operation has completed/failed/cancelled.
     */
    isRunning: boolean;
    /**
     * Whether the current or most recent operation was cancelled.
     * Remains true after cancellation for status tracking until a new
     * operation starts. False if operation completed normally or failed.
     */
    isCancelled: boolean;
    /**
     * Cancels the currently running Future operation.
     * Sends cancellation request to the backend service managing the Future.
     * No-op if no Future is currently active.
     * @returns Promise that resolves when cancellation is acknowledged
     * @throws Error if cancellation request fails
     */
    cancelFuture(): Promise<void>;
}
/**
 * Class decorator that automatically adds Future Container capabilities to a KOS model.
 *
 * This decorator eliminates the need for manual Future Container setup by:
 * - Adding a futureHandler property for managing Future operations
 * - Adding reactive getters for future, progress, status, isRunning, isCancelled (in full mode)
 * - Adding cancelFuture method for canceling operations (in full mode)
 *
 * **Important**: Use TypeScript interface merging to get proper type information:
 *
 * ```typescript
 * // Add ESLint disable comment at top of file, then:
 * interface MyModelImpl extends KosFutureAwareFull<MyDataType> {}
 *
 * kosFutureAware()
 * class MyModelImpl implements IKosDataModel {
 *   // All Future properties are now available with full type safety
 * }
 * ```
 *
 * Note: This decorator supports single Future operations. For models that need to manage
 * multiple concurrent Futures, use @kosMultiFutureAware (coming soon).
 *
 * @param options Configuration options for the decorator
 * @returns A class decorator
 *
 * @example
 * ```typescript
 * // Full mode example
 * interface DeviceOperationsModelImpl extends KosFutureAwareFull<OperationData> {}
 *
 * kosFutureAware()
 * class DeviceOperationsModelImpl implements IKosDataModel {
 *   onFutureUpdate?(future: IFutureModel<OperationData>): void {
 *     // Handle Future updates
 *   }
 *
 *   kosFuture()
 *   async performOperation(): Promise<OperationData> {
 *     return { result: "done" };
 *   }
 * }
 *
 * // Minimal mode example
 * interface BackgroundServiceModelImpl extends KosFutureAwareMinimal {}
 *
 * kosFutureAware({ mode: 'minimal' })
 * class BackgroundServiceModelImpl implements IKosDataModel {
 *   kosFuture()
 *   async backgroundTask() {
 *     return "done";
 *   }
 * }
 * ```
 *
 * @category KOS Model Decorator
 * @since 2.0.0
 * @kosService core.future-aware
 * @kosApiLevel 13
 */
export declare function kosFutureAware(options?: KosFutureAwareOptions): ClassDecorator;
//# sourceMappingURL=kos-future-aware.d.ts.map