import { IKosContainerModel } from '../core/kosModel';
import { IKosModelContainer } from '../core/kos-container-model';

interface Identifiable {
    id: string;
}
export type IdMapper = <D extends Identifiable = Identifiable>(entity: D) => D;
type Container = IKosContainerModel<any, any> | IKosModelContainer<any>;
interface ResolveParams<T extends Container, D> {
    container: T;
    onAddItem: (entity: D) => any;
    onRemoveItem?: (id: string) => any;
    onUpdateItem?: (entity: D, existingModel: any) => any;
    idMapper?: IdMapper;
}
export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>, D extends Identifiable>({ container, onAddItem, onUpdateItem, onRemoveItem, idMapper, }: ResolveParams<T, D>) => (entities: D[]) => void;
export declare const resolveListDeltas: <T extends IKosContainerModel<any, any>, D extends Identifiable>({ container, onAddItem, onRemoveItem, idMapper, }: ResolveParams<T, D>) => (entities: D[]) => void;
interface ResolveItemsParams<T extends Identifiable, D> {
    items: T[];
    onAddItem: (entity: D) => void;
    onRemoveItem: (id: string) => void;
    idMapper?: IdMapper;
}
export declare const resolveItemListDeltas: <T extends Identifiable, D extends Identifiable>({ items, onAddItem, onRemoveItem, idMapper, }: ResolveItemsParams<T, D>) => (entities: D[]) => void;
export declare const processId: (id: string, prefix?: string) => string;
export {};
//# sourceMappingURL=container-utils.d.ts.map