import type { SearchResult } from "../../components/ui/search-input"; export interface UseSearchConfig { /** Async function that performs the search */ searchFn: (query: string) => Promise; /** Maps each raw item to a SearchResult */ mapResult: (item: T) => SearchResult; /** Debounce delay in ms. Default 300 */ debounceMs?: number; /** Minimum characters before searching. Default 2 */ minQueryLength?: number; } export interface UseSearchReturn { query: string; setQuery: (q: string) => void; results: SearchResult[]; isLoading: boolean; error: string | null; clearResults: () => void; } /** * Generic search state management hook. * * Debounces the query, calls `searchFn` when the debounced value meets * `minQueryLength`, and maps the raw results via `mapResult`. */ export declare function useSearch(config: UseSearchConfig): UseSearchReturn; //# sourceMappingURL=use-search.d.ts.map