import { AsyncThunkAction } from '@reduxjs/toolkit';
import { FacetSearchAPIClient } from '../../../../api/search/search-api-client.js';
import { AsyncThunkOptions } from '../../../../app/async-thunk-options.js';
import { CoreEngine, CoreEngineNext } from '../../../../app/engine.js';
import { ClientThunkExtraArguments, ThunkExtraArguments } from '../../../../app/thunk-extra-arguments.js';
import { CategoryFacetSearchState } from '../../../../features/facets/facet-search-set/category/category-facet-search-set-state.js';
import { FacetSearchOptions } from '../../../../features/facets/facet-search-set/facet-search-request-options.js';
import { SpecificFacetSearchState } from '../../../../features/facets/facet-search-set/specific/specific-facet-search-set-state.js';
import { CategoryFacetSearchSection, FacetSearchSection } from '../../../../state/state-sections.js';
type FacetSearchState = SpecificFacetSearchState | CategoryFacetSearchState;
export interface GenericFacetSearchProps<T extends FacetSearchState> {
    options: FacetSearchOptions;
    getFacetSearch: () => T;
    isForFieldSuggestions: boolean;
    executeFacetSearchActionCreator: (facetId: string) => AsyncThunkAction<unknown, unknown, AsyncThunkOptions<unknown, ThunkExtraArguments>>;
    executeFieldSuggestActionCreator: (facetId: string) => AsyncThunkAction<unknown, unknown, AsyncThunkOptions<unknown, ThunkExtraArguments>>;
}
export type GenericFacetSearch = ReturnType<typeof buildGenericFacetSearch>;
export declare function buildGenericFacetSearch<T extends FacetSearchState>(engine: CoreEngine<FacetSearchSection | CategoryFacetSearchSection, ClientThunkExtraArguments<FacetSearchAPIClient>> | CoreEngineNext<FacetSearchSection | CategoryFacetSearchSection, ClientThunkExtraArguments<FacetSearchAPIClient>>, props: GenericFacetSearchProps<T>): {
    /** Updates the facet search query.
     * @param text The new query.
     */
    updateText(text: string): void;
    /** Increases number of results returned by numberOfResults */
    showMoreResults(): void;
    /** Executes a facet search to update the values.*/
    search(): void;
    /** Resets the query and empties the values. */
    clear(): void;
    /**
     * Updates the facet value captions.
     * @param captions - A dictionary that maps index field values to facet value display names.
     */
    updateCaptions(captions: Record<string, string>): void;
    readonly state: {
        values: T["response"]["values"];
        isLoading: boolean;
        query: string;
        moreValuesAvailable: boolean;
    } | {
        values: T["response"]["values"];
        isLoading: boolean;
        query: string;
        moreValuesAvailable: boolean;
    };
};
export {};
