import type { ModelConfig } from '../types';
import { BaseSyncModel } from './BaseSyncModel';
export interface CollectionItem {
    id: string;
    [key: string]: unknown;
}
export declare class CollectionSyncModel<T extends CollectionItem = CollectionItem> extends BaseSyncModel<Map<string, T>> {
    private yMap;
    private items;
    constructor(config?: ModelConfig);
    protected initializeYjsStructure(): void;
    protected setupYjsBinding(): void;
    getValue(): Map<string, T>;
    setValue(value: Map<string, T> | T[]): void;
    create(item: Omit<T, 'id'> | T): string;
    update(id: string, partial: Partial<T>): void;
    delete(id: string): void;
    get(id: string): T | undefined;
    get all(): T[];
    getAll(): Map<string, T>;
    get size(): number;
    get isEmpty(): boolean;
    has(id: string): boolean;
    clear(): void;
    batchCreate(items: (Omit<T, 'id'> | T)[]): string[];
    batchUpdate(updates: Map<string, Partial<T>> | Array<{
        id: string;
    } & Partial<T>>): void;
    batchDelete(ids: string[]): void;
    find(predicate: (item: T) => boolean): T[];
    findOne(predicate: (item: T) => boolean): T | undefined;
    sort(compareFn: (a: T, b: T) => number): T[];
    filter(predicate: (item: T) => boolean): T[];
    map<R>(mapper: (item: T) => R): R[];
    reduce<R>(reducer: (acc: R, item: T) => R, initial: R): R;
    private updateItemInternal;
    private deleteItemInternal;
    subscribeToItem(id: string, callback: (item: T | undefined) => void): () => void;
    subscribeToSize(callback: (size: number) => void): () => void;
}
