import { SharedState } from '@vertesia/ui/core';
import { ComputeFacetsResponse, ZenoClient } from '@vertesia/client';
import { ComplexSearchQuery, ContentObjectItem, FacetBucket, FacetSpec, ObjectSearchQuery } from '@vertesia/common';
import { SearchInterface } from '@vertesia/ui/features';
interface DocumentSearchResult {
    objects: ContentObjectItem[];
    error?: Error;
    isLoading: boolean;
    hasMore?: boolean;
}
export declare class DocumentSearch implements SearchInterface {
    client: ZenoClient;
    limit: number;
    collectionId?: string;
    facets: SharedState<ComputeFacetsResponse>;
    result: SharedState<DocumentSearchResult>;
    facetSpecs: FacetSpec[];
    query: ComplexSearchQuery;
    constructor(client: ZenoClient, limit?: number);
    withFacets(facets: FacetSpec[]): this;
    get objects(): ContentObjectItem<Record<string, any>>[];
    get error(): Error | undefined;
    get isRunning(): boolean;
    get hasMore(): boolean;
    getFilterValue(name: string): any;
    setFilterValue(name: string, value: any): void;
    setDefaultKeys(keys: any[]): void;
    clearFilters(autoSearch?: boolean): void;
    getFacetBuckets(name: string): FacetBucket[];
    resetFacets(): void;
    reset(isLoading?: boolean): void;
    _updateRunningState(value: boolean): void;
    _searchRequest(query: ComplexSearchQuery, limit: number, offset: number, includeFacets?: boolean): Promise<import("@vertesia/client").SearchResponse>;
    _facetsRequest(): Promise<ComputeFacetsResponse>;
    computeFacets(_query: ObjectSearchQuery): void;
    _search(loadMore?: boolean, noFacets?: boolean): Promise<boolean>;
    search(noFacets?: boolean): Promise<boolean>;
    loadMore(noFacets?: boolean): Promise<boolean>;
}
declare const DocumentSearchContext: import("react").Context<DocumentSearch | undefined>;
export declare function useDocumentSearch(): DocumentSearch;
export declare function useWatchDocumentSearchFacets(): ComputeFacetsResponse;
export declare function useWatchDocumentSearchResult(): {
    search: DocumentSearch;
    objects: ContentObjectItem[];
    error?: Error;
    isLoading: boolean;
    hasMore?: boolean;
};
export declare function useDocumentSearchCount(): number | undefined;
export { DocumentSearchContext as SearchContext };
//# sourceMappingURL=DocumentSearchContext.d.ts.map