import { DependencyLifecycle } from '../types';
import { IKosModel } from './kosModel';
import { KosModelCacheHandler } from './model-cache';
import { IKosRegistry } from './types';
/**
 * Handles creation and lifecycle management of companion models.
 * Companions are models that extend or enhance parent models and can be
 * created at specific lifecycle phases based on decorator configuration.
 */
export declare class KosCompanionInstantiator {
    private registry;
    private cache;
    private createModel;
    constructor(registry: IKosRegistry, cache: KosModelCacheHandler, createModel: (typeId: string, id: string, options: Record<string, any>) => any);
    /**
     * Creates companion models for a parent model, optionally filtered by lifecycle phase.
     * Called automatically during instantiation for companions without lifecycle specified.
     * Can be called from lifecycle hooks to create lifecycle-deferred companions.
     *
     * @param model The parent model
     * @param options Options to pass to companion constructors
     * @param lifecycle Optional lifecycle filter - only create companions matching this phase
     */
    createCompanionModels(model: IKosModel, options: Record<string, any>, lifecycle?: DependencyLifecycle): void;
    /**
     * Get companion definitions for a parent model type
     */
    private getCompanionDefinitions;
    /**
     * Resolve companion type from definition and extract lifecycle metadata
     */
    private resolveCompanionType;
    /**
     * Resolve factory companion by calling factory and extracting lifecycle
     */
    private resolveFactoryCompanion;
    /**
     * Resolve string companion using pre-extracted lifecycle from registration
     */
    private resolveStringCompanion;
    /**
     * Extract lifecycle metadata from companion model decorator
     */
    private extractLifecycleFromType;
    /**
     * Determine if companion should be created based on lifecycle filtering
     */
    private shouldCreateCompanion;
    /**
     * Instantiate and attach companion to parent model
     */
    private instantiateCompanion;
    /**
     * Generate unique companion ID
     */
    private generateCompanionId;
    /**
     * Check if companion already exists in cache
     */
    private companionAlreadyExists;
    /**
     * Create companion model instance with parent context
     */
    private createCompanionInstance;
    /**
     * Attach companion to parent model
     */
    private attachCompanionToParent;
}
//# sourceMappingURL=companion-instantiator.d.ts.map