import type { SchemaKey } from '@tachybase/schema';
import type { DataSource } from '../data-source';
import { Collection, type CollectionFieldOptions, type CollectionOptions, type GetCollectionFieldPredicate } from './Collection';
export declare class CollectionManager {
    dataSource: DataSource;
    collectionInstancesMap: Record<string, Collection>;
    collectionInstancesArr: Collection[];
    constructor(collections: CollectionOptions[], dataSource: DataSource);
    get dataSourceManager(): import("..").DataSourceManager;
    get app(): import("../..").Application;
    protected getCollectionInstance(collection: CollectionOptions): any;
    private getInstancesMap;
    addCollections(collections?: CollectionOptions[]): void;
    setCollections(collections: CollectionOptions[]): void;
    reAddCollections(collectionInstances?: Collection[]): void;
    /**
     * Get a collection
     * @example
     * getCollection('users'); // Get the 'users' collection
     * getCollection('users.profile'); // Get the associated collection of the 'profile' field in the 'users' collection
     * getCollection('a.b.c'); // Get the associated collection of the 'c' field in the 'a' collection, which is associated with the 'b'  field in the 'a' collection
     */
    getCollection<Mixins = {}>(path: SchemaKey | CollectionOptions): (Mixins & Collection) | undefined;
    getCollections(predicate?: (collection: Collection) => boolean): Collection[];
    getCollectionName(path: SchemaKey | CollectionOptions): string | undefined;
    /**
     * Get collection field
     * @example
     * getField('users.username'); // Get the 'username' field of the 'users' collection
     * getField('a.b.c'); // Get the associated collection of the 'c' field in the 'a' collection, which is associated with the 'b' field in the 'a' collection
     */
    getCollectionField(path: SchemaKey | CollectionFieldOptions): any;
    getCollectionFields(collectionName: string, predicate?: GetCollectionFieldPredicate): CollectionFieldOptions[];
    getSourceKeyByAssocation(associationName: string): any;
    /**
     * @internal
     */
    clone(collections?: CollectionOptions[]): CollectionManager;
}
