import { AutocompletePlugin } from '@algolia/autocomplete-js'; import { CreateRecentSearchesPluginParams, RecentSearchesPluginData } from './createRecentSearchesPlugin'; import { SearchParams } from './search'; import { Highlighted, RecentSearchesItem } from './types'; export declare type CreateRecentSearchesLocalStorageOptions = { /** * A local storage key to identify where to save and retrieve the recent searches. * * For example: * - "navbar" * - "search" * - "main" * * The plugin namespaces all keys to avoid collisions. * * @example "top_searchbar" * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-recent-searches/createLocalStorageRecentSearchesPlugin/#param-key */ key: string; /** * The number of recent searches to display. * * @default 5 * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-recent-searches/createLocalStorageRecentSearchesPlugin/#param-limit */ limit?: number; /** * A search function to retrieve recent searches from. * * This function is called in [`storage.getAll`](https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-recent-searches/createRecentSearchesPlugin/#param-storage) to retrieve recent searches and is useful to filter and highlight recent searches when typing a query. * * @link https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-plugin-recent-searches/createLocalStorageRecentSearchesPlugin/#param-search */ search?(params: SearchParams): Array>; }; declare type LocalStorageRecentSearchesPluginOptions = Pick, 'transformSource' | 'subscribe' | 'translations'> & CreateRecentSearchesLocalStorageOptions; export declare function createLocalStorageRecentSearchesPlugin(options: LocalStorageRecentSearchesPluginOptions): AutocompletePlugin>; export {};