import { ComputedRef } from 'vue';
import { Ref } from 'vue';

/**
 * The keys are the unique id for each item/record.
 * The values are a string of concatenated values for the searchable fields.
 */
export declare type SearchMap = {
    [key: string]: string;
};

declare function useSearch<Item = unknown>({ items, fieldNames, trackBy }: UseSearchArgs<Item>): {
    searchFor: (searchTerm: string, options?: {
        fuzzy?: boolean;
    }) => Item[];
};
export default useSearch;

export declare interface UseSearchArgs<Item = unknown> {
    items: Ref<Item[]> | ComputedRef<Item[]>;
    fieldNames: string[];
    trackBy?: string;
}

export { }
