import { KosContextLogger } from '../kosModel';
/**
 * Configuration options for the @kosViewModel decorator.
 *
 * @kosService core.view-model
 * @kosApiLevel 20
 */
export interface KosViewModelOptions {
    /**
     * Optional type identifier for this ViewModel.
     * Used for logging, debugging, and optional DevTools registration.
     * If not provided, defaults to the class name.
     */
    typeId?: string;
    /**
     * When true, registers this ViewModel with KOS DevTools for inspection.
     * Default: false (ViewModels are not tracked by default)
     */
    devToolsEnabled?: boolean;
}
/**
 * Interface for ViewModels that support cleanup.
 * Implement this to have automatic disposal when using useViewModel.
 *
 * @kosService core.view-model
 * @kosApiLevel 20
 */
export interface IKosViewModelDisposable {
    dispose(): void | Promise<void>;
}
/**
 * Interface for ViewModels that require async initialization.
 * Implement this to await model readiness or perform async setup.
 *
 * When a ViewModel implements this interface, the useViewModel hook will:
 * - Call ready() after construction
 * - Track ready state and any errors
 * - Return { viewModel, ready, error } instead of just the viewModel
 *
 * @example
 * ```typescript
 * @kosViewModel({ typeId: 'order-summary' })
 * class OrderSummaryViewModel implements IKosViewModelReady {
 *   constructor(
 *     private order: IOrderModel,
 *     private inventory: IInventoryModel
 *   ) {}
 *
 *   async ready(): Promise<void> {
 *     // Await model readiness before ViewModel is considered ready
 *     await Promise.all([
 *       this.order.whenReady?.(),
 *       this.inventory.whenReady?.()
 *     ]);
 *   }
 * }
 * ```
 *
 * @kosService core.view-model
 * @kosApiLevel 20
 */
export interface IKosViewModelReady {
    ready(): Promise<void>;
}
/**
 * Type guard to check if an object implements IKosViewModelReady.
 */
export declare function hasReadyHook(obj: unknown): obj is IKosViewModelReady;
/**
 * Interface for models using @kosLoggerAware decorator with @kosViewModel.
 * Use TypeScript interface merging to add the logger property to your ViewModel class.
 *
 * @example
 * ```typescript
 * interface MyViewModel extends KosLoggerAware {}
 *
 * @kosViewModel({ typeId: 'my-view-model' })
 * @kosLoggerAware()
 * export class MyViewModel {
 *   constructor(private readonly model: IMyModel) {}
 *
 *   doSomething() {
 *     this.logger.info('Doing something');
 *   }
 * }
 * ```
 *
 * @kosService core.view-model
 * @kosApiLevel 20
 */
export interface KosViewModelLoggerAware {
    logger: KosContextLogger;
}
/**
 * Type guard to check if an object implements IKosViewModelDisposable.
 */
export declare function isDisposable(obj: unknown): obj is IKosViewModelDisposable;
/**
 * Lightweight model decorator that provides observability without
 * the full KOS model lifecycle machinery.
 *
 * Use @kosViewModel when:
 * - You need observable state for React components
 * - Dependencies are passed directly via constructor (no @kosDependency resolution)
 * - You don't need lifecycle methods (init, load, ready, activate)
 * - You want to instantiate with `new` rather than through factories
 *
 * @param options Configuration options for the ViewModel
 * @returns A class decorator
 *
 * @example
 * ```typescript
 * // Basic usage
 * @kosViewModel({ typeId: 'counter' })
 * export class CounterViewModel {
 *   count = 0;
 *
 *   increment() {
 *     this.count++;
 *   }
 * }
 *
 * // With logger support
 * interface OrderSummaryViewModel extends KosViewModelLoggerAware {}
 *
 * @kosViewModel({ typeId: 'order-summary' })
 * @kosLoggerAware()
 * export class OrderSummaryViewModel implements IKosViewModelDisposable {
 *   constructor(
 *     private readonly order: IOrderModel,
 *     private readonly inventory: IInventoryModel
 *   ) {
 *     this.logger.info('ViewModel created');
 *   }
 *
 *   get total(): number {
 *     return this.order.items.reduce((sum, i) => sum + i.price, 0);
 *   }
 *
 *   get hasStockIssues(): boolean {
 *     return this.order.items.some(item =>
 *       this.inventory.getStock(item.productId) < item.quantity
 *     );
 *   }
 *
 *   dispose(): void {
 *     this.logger.info('ViewModel disposed');
 *   }
 * }
 *
 * // Usage in React component
 * function OrderSummary({ orderId }: Props) {
 *   const { model: order } = useKosModel<IOrderModel>({ modelId: orderId });
 *   const { model: inventory } = useKosModel<IInventoryModel>({ modelId: 'inventory' });
 *
 *   const vm = useViewModel(
 *     () => new OrderSummaryViewModel(order!, inventory!),
 *     [order, inventory]
 *   );
 *
 *   return (
 *     <div>
 *       <p>Total: ${vm.total}</p>
 *       {vm.hasStockIssues && <Warning>Some items may be unavailable</Warning>}
 *     </div>
 *   );
 * }
 * ```
 *
 * @category KOS ViewModel Decorator
 * @kosService core.view-model
 * @kosApiLevel 20
 */
export declare function kosViewModel(options?: KosViewModelOptions): ClassDecorator;
//# sourceMappingURL=kos-view-model.d.ts.map