import { SingletonKosModelRegistrationFactory } from './singleton-kos-model-registration-factory';
import { KosModelRegistrationFactory } from './base-kos-model-registration';
import { IKosDataModel, KosCreationContext, UpdateAware } from '../kosModel';
import { Kos } from '../kos-model-factory';
import { isKosModel } from '../../util/kos-model-utils';
import { BaseKosModelRegistrationBean } from '../../types/model';

export declare const isUpdateable: (model: any) => model is UpdateAware<Record<string, any>>;
interface ModelRegistration<B extends boolean, T extends IKosDataModel, O extends object = Record<string, any>> {
    singleton: boolean;
    class: new (modelId: string, options: O, context: KosCreationContext) => T;
    type: string;
    factory: FactoryType<B, T, O>;
}
type FactoryType<B extends boolean, T extends IKosDataModel, O extends object = Record<string, any>> = B extends true ? ReturnType<typeof Kos.Singleton.create<T, O>> : ReturnType<typeof Kos.Factory.create<T, O>>;
type KosOptionsFunction<T extends IKosDataModel, O extends object = Record<string, any>> = (options: O) => {
    build: () => T;
};
export interface KosInstance<T extends IKosDataModel, O extends object = Record<string, any>> {
    get: () => T;
    options: KosOptionsFunction<T, O>;
    forceUpdate: {
        options: KosOptionsFunction<T, O>;
    };
}
export type KosModelRegistrationType<T extends IKosDataModel, O extends object = Record<string, any>> = KosModelRegistrationFactory<T, O> | SingletonKosModelRegistrationFactory<T, O>;
export declare const isKosModelRegistration: (item: any) => item is KosModelRegistrationType<any, any>;
export declare abstract class KosBaseModelRegistration<B extends boolean, T extends IKosDataModel, O extends object = Record<string, any>> {
    singleton: boolean;
    type: string;
    loader: string;
    class: new (modelId: string, options: O, context: KosCreationContext) => T;
    guard: ReturnType<typeof isKosModel<T>>;
    factory: FactoryType<B, T, O>;
    relatedModels: KosModelRegistrationType<any, any>[];
    constructor(props: ModelRegistration<B, T, O>);
    addRelatedModel(model: KosModelRegistrationType<any, any>): void;
    registerRelatedModels(): void;
    abstract registration(): BaseKosModelRegistrationBean<T, O>;
    register(): void;
    abstract instance(id?: string): KosInstance<T, O>;
}
export type KosModelRegistrationProps<T extends IKosDataModel, O extends object = Record<string, any>> = Omit<ModelRegistration<false, T, O>, "singleton" | "factory">;
export {};
//# sourceMappingURL=model-registration.d.ts.map