import type { FieldSuggestionsFacet } from '../../../api/commerce/search/query-suggest/query-suggest-response.js';
import type { SpecificFacetSearchResult } from '../../../api/search/facet-search/specific-facet-search/specific-facet-search-response.js';
import type { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js';
import { type Controller } from '../../controller/headless-controller.js';
import type { FacetControllerType } from '../core/facets/headless-core-commerce-facet.js';
import type { RegularFacetOptions } from '../core/facets/regular/headless-commerce-regular-facet.js';
import { type RegularFacetSearchState } from '../core/facets/regular/headless-commerce-regular-facet-search.js';
/**
 * The state of the `FilterSuggestions` controller.
 *
 * @group Buildable controllers
 * @category FilterSuggestions
 */
export type FilterSuggestionsState = RegularFacetSearchState & Pick<FieldSuggestionsFacet, 'facetId' | 'displayName' | 'field'>;
/**
 * The `FilterSuggestions` controller provides methods to request and interact with facet suggestions based on a
 * specific field for a given search query.
 *
 * @alpha  This controller relies on a Commerce API functionality that is not yet generally available. If you wish to
 * use this feature in an implementation, please contact your Coveo representative.
 *
 * @group Buildable controllers
 * @category FilterSuggestions
 */
export interface FilterSuggestions extends Controller, FacetControllerType<'regular'> {
    /**
     * Resets the query in the controller state and clears the filter suggestions.
     */
    clear(): void;
    /**
     * Returns the serialized search parameters for the current search query and specified filter suggestion.
     *
     * For example, `q=jeans&f-cat_color=Blue`.
     *
     * In a typical scenario, this method should be called when the user selects a filter suggestion from a standalone
     * search box. The returned string is then used to pass the correct URL query parametes or fragment when redirecting
     * the browser to the search page.
     *
     * When the user selects a filter suggestion from the main search box on the search page, use the `select` method
     * instead.
     *
     * @param value - The filter suggestion to serialize.
     * @returns The serialized search parameters for the current search query and specified filter suggestion.
     */
    getSearchParameters(value: SpecificFacetSearchResult): string;
    /**
     * Clears all facet values, selects the specified filter suggestion, updates the query, and executes a new search
     * request.
     *
     * In a typical scenario, this method should be called when the user selects a filter suggestion from the main search
     * box on the search page.
     *
     * When the user selects a filter suggestion from a standalone search box, use the `getSearchParameters` method
     * instead.
     *
     * @param value - The filter suggestion to select.
     */
    select(value: SpecificFacetSearchResult): void;
    /**
     * Sets the query in the controller state to the specified value and requests filter suggestions based on the updated
     * query.
     *
     * For example, if this method is called with `jeans` as an argument, it will request values from the controller's
     * field (e.g., `ec_brand`) that would return results if selected when the search query is `jeans` (such as
     * `Calvin Klein`, `Columbia`, and `Nautica`).
     *
     * @param query - The search query to use as context to request the category filter suggestions. In a typical
     * scenario, this should set to the current value of the search box input.
     */
    updateQuery(query: string): void;
    state: FilterSuggestionsState;
}
/**
 * The `FilterSuggestions` controller provides methods to request and interact with facet suggestions based on a
 * specific field for a given search query.
 *
 * @alpha  This controller relies on a Commerce API functionality that is not yet generally available. If you wish to use this
 * feature in an implementation, please contact your Coveo representative.
 *
 * @param engine - The headless commerce engine.
 * @param options - The options for the `FilterSuggestions` controller.
 * @returns A `FilterSuggestions` controller instance.
 *
 * @group Buildable controllers
 * @category FilterSuggestions
 */
export declare function buildFilterSuggestions(engine: CommerceEngine, options: RegularFacetOptions): FilterSuggestions;
