/**
 * Options for configuring the `useSearch` hook.
 */
type UseSearchOptions<T> = {
    /**
     * List of object fields to search within. Dot notation (e.g. `'address.city'`) is supported for nested properties.
     * If omitted, all top-level string and number fields will be used.
     */
    fields?: (keyof T | string)[];
    /**
     * Optional custom filtering function.
     * If provided, this takes precedence over field-based filtering.
     *
     * @param item - The current item in the list.
     * @param query - The current search query string.
     * @returns `true` if the item should be included in the filtered list.
     */
    customFilter?: (item: T, query: string) => boolean;
    /**
     * Number of milliseconds to debounce the search input.
     * If omitted, debounce is disabled.
     */
    debounceMs?: number;
    /**
     * Whether to perform a case-sensitive match.
     * Default is `false` (case-insensitive).
     *
     * @default false
     */
    caseSensitive?: boolean;
};
/**
 * A hook to filter a list of objects by a search value.
 * Supports field-based filtering, custom filtering logic, debounce, and case sensitivity.
 *
 * @template T - The type of items in the list (must be an object).
 *
 * @param list - The array of objects to search through.
 * @param options - Configuration options for the search behavior.
 * @param options.fields - Fields to search through. If omitted, all top-level string/number fields are used.
 * @param options.customFilter - Optional custom filter function overriding field-based filtering.
 * @param options.debounceMs - Debounce time in milliseconds.
 * @param options.caseSensitive - Whether the search should be case-sensitive.
 *
 * @returns An object containing:
 * - `searchValue`: The current search input string.
 * - `setSearchValue`: A setter function to update the search query.
 * - `filteredList`: The list of items matching the current search query.
 *
 * @example
 * ```ts
 * const { searchValue, setSearchValue, filteredList } = useSearch(users, {
 *   fields: ['name', 'email'],
 *   debounceMs: 300,
 * });
 * ```
 */
declare const useSearch: <T extends object>(list: T[], options?: UseSearchOptions<T>) => {
    searchValue: string;
    setSearchValue: (query: string) => void;
    filteredList: T[];
};
export default useSearch;
