import { IKosDataModel } from '../kosModel';
import { IndexMapper } from '../kos-container-index';
import { RendererConstructor } from '../../../models';

export type ExtensionType = number | string | boolean;
export type DataMapper<I extends object = any, O extends object = any, C extends object = any> = (input: I, context?: C) => Promise<O>;
export type PropertyMapper<I extends object = any, O extends ExtensionType = any, C extends object = any> = (input: I, context?: C) => O;
export type DataLoader<I extends object = any, O extends object = any> = (input: I) => Promise<O>;
export type IndexExtension<T extends IKosDataModel = any> = Record<string, keyof T | IndexMapper<any>>;
export declare const EXTENSION_CANVAS_RENDERER = "canvas-renderer";
export interface ExtensionPoint<Data extends object = any, Output extends object = any, Context extends object = any> {
    register: (id: string, extension: any) => void;
    execute: (id: string, data: Data, context?: Context) => Output;
}
export declare const registerExtensionPoint: (id: string, extensionPoint: ExtensionPoint) => void;
declare const _ExtensionManager: {
    indexExtension: {
        registerIndexExtension: (id: string, extension: IndexExtension) => void;
        loadIndexExtensions: (id: string) => IndexExtension<any>;
    };
    loader: {
        registerLoader: (id: string, loader: DataLoader) => void;
        executeLoader: <T extends object = any>(id: string, data: T) => Promise<any>;
    };
    propertyMapper: {
        registerPropertyMapper: (id: string, mapper: PropertyMapper) => void;
        hasMapper: (id: string) => boolean;
        executeMapper: <T_1 extends object = any, O extends ExtensionType = any, C extends object = any>(id: string, data: T_1, context?: C) => O;
    };
    dataMapper: {
        registerDataMapper: (id: string, mapper: DataMapper) => void;
        executeMapper: <T_2 extends object = any, O_1 extends object = any, C_1 extends object = any>(id: string, data: T_2, context?: C_1 | undefined) => Promise<O_1>;
    };
    canvas: {
        registerRenderer: (id: string, renderer: RendererConstructor) => void;
    };
};
export interface IExtensionManager {
}
type ExtensionManagerType = typeof _ExtensionManager & IExtensionManager & {
    [key: string]: ExtensionPoint;
};
export declare const ExtensionManager: ExtensionManagerType;
export {};
//# sourceMappingURL=extension-manager.d.ts.map