import { IKosIdentifiable } from './types/model';
import { IKosBaseContainer } from './kos-container-model';
import { KosData } from '../util';

interface KosContainerIndexOptions<T extends IKosIdentifiable> {
    container: IKosBaseContainer<T>;
    key: keyof T | IndexMapper<T>;
}
export interface IKosContainerIndex<T extends IKosIdentifiable> {
    index: Map<string, Set<T>>;
    keys: string[];
    data: KosData<Record<string, T[]>>;
    getByKey: (key: string) => T[];
    refresh: () => void;
}
export interface IndexMapper<T extends IKosIdentifiable> {
    (model: T): Promise<string | string[] | undefined> | string | string[] | undefined;
}
export declare class KosContainerIndex<T extends IKosIdentifiable> implements IKosContainerIndex<T> {
    private _container;
    private _map;
    private _key;
    data: KosData<Record<string, T[]>>;
    constructor({ container, key }: KosContainerIndexOptions<T>);
    refresh(): void;
    private addItemToIndex;
    private resolveIndex;
    private generateIndex;
    get keys(): string[];
    get index(): Map<string, Set<T>>;
    getByKey(key: string): T[];
}
export {};
//# sourceMappingURL=kos-container-index.d.ts.map