/** * A React hook that implements a fuzzy search trie for efficient searching and suggestions. * * @template T The type of items stored in the trie. * @param {UseTrieOptions} options - Configuration options for the fuzzy trie. * @param {T[]} [options.items=[]] - An array of items to be added to the trie. * @param {(item: T) => string} options.getSearchString - A function that returns the search string for each item. * @param {number} [options.debounceMs=150] - The debounce time in milliseconds for the search function. * @param {number} [options.minSearchLength=1] - The minimum length of the search term to start searching. * @param {number} [options.maxDistance=2] - The maximum Levenshtein distance for fuzzy matching. * @param {number} [options.maxResults=10] - The maximum number of results to return. * @returns {{ * search: (searchTerm: string) => void, * suggestions: T[] * }} An object containing the search function and current suggestions. */ declare function useFuzzyFilter({ items, getSearchString, debounceMs, minSearchLength, maxDistance, maxResults, }: UseTrieOptions): { search: (searchTerm: string) => void; suggestions: T[]; }; export { useFuzzyFilter }; interface UseTrieOptions { items?: T[]; getSearchString: (item: T) => string; debounceMs?: number; minSearchLength?: number; maxDistance?: number; maxResults?: number; }