import type { SearchResult } from "../../components/ui/search-input";
export interface UseSearchConfig<T> {
    /** Async function that performs the search */
    searchFn: (query: string) => Promise<T[]>;
    /** 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<T>(config: UseSearchConfig<T>): UseSearchReturn;
//# sourceMappingURL=use-search.d.ts.map