import type { SearchEngine } from '../../app/search-engine/search-engine.js';
import { type Controller } from '../controller/headless-controller.js';
export interface RecentQueriesListProps {
    /**
     * The initial state that should be applied to the `RecentQueriesList` controller.
     */
    initialState?: RecentQueriesListInitialState;
    /**
     * The configuration options that should be applied to the `RecentQueriesList` controller.
     */
    options?: RecentQueriesListOptions;
}
export interface RecentQueriesListInitialState {
    /**
     * The list of recent queries.
     * @defaultValue `[]`
     */
    queries: string[];
}
export interface RecentQueriesListOptions {
    /**
     * The maximum number of queries to retain in the list.
     * @defaultValue `10`
     */
    maxLength: number;
    /**
     * Whether to clear all active query filters when the end user submits a new query from the recent queries list.
     * Setting this option to "false" is not recommended & can lead to an increasing number of queries returning no results.
     */
    clearFilters?: boolean;
}
/**
 * The `RecentQueriesList` controller manages the user's recent queries.
 *
 * Example: [recent-queries.fn.tsx](https://github.com/coveo/ui-kit/blob/main/packages/samples/headless-react/src/components/recent-queries/recent-queries.fn.tsx)
 *
 * @group Controllers
 * @category RecentQueriesList
 */
export interface RecentQueriesList extends Controller {
    /**
     * The state of the RecentQueriesList controller.
     * */
    state: RecentQueriesState;
    /**
     * Clears the recent queries list.
     */
    clear(): void;
    /**
     * Executes the given recent query.
     * @param index - The index of the recent query to execute.
     */
    executeRecentQuery(index: number): void;
    /**
     * Sets the recent queries list to the specified array of queries.
     * @param queries - The array of queries to set.
     */
    updateRecentQueries(queries: string[]): void;
}
/**
 * A scoped and simplified part of the headless state that is relevant to the `RecentQueriesList` controller.
 *
 * @group Controllers
 * @category RecentQueriesList
 * */
export interface RecentQueriesState {
    /**
     * The list of recent queries.
     */
    queries: string[];
    /**
     * The maximum number of queries to retain in the list.
     */
    maxLength: number;
    /**
     * Whether analytics & tracking are enabled.
     * In the case where it is disabled, it is recommended not to save recent queries.
     */
    analyticsEnabled: boolean;
}
/**
 * Creates a `RecentQueriesList` controller instance.
 *
 * @param engine - The headless engine.
 * @param props - The configuration `RecentQueriesList` properties.
 * @returns A `RecentQueriesList` controller instance.
 *
 * @group Controllers
 * @category RecentQueriesList
 * */
export declare function buildRecentQueriesList(engine: SearchEngine, props?: RecentQueriesListProps): RecentQueriesList;
