import type { MaybeRefOrGetter } from '../../types/shared/utils'; import type { ComputedRef, ShallowRef } from 'vue'; export type RemoteSearchFn = (query: string) => T[] | Promise; export interface UseRemoteSearchOptions { query: MaybeRefOrGetter; search?: MaybeRefOrGetter | undefined>; } export interface UseRemoteSearchReturn { /** The answer the query last settled on, absent before the first one. */ matches: ShallowRef; /** Whether a search function is set at all. */ remote: ComputedRef; /** The trimmed query every answer is keyed to. */ needle: ComputedRef; /** Whether a request is in flight, the debounce window included. */ pending: ShallowRef; } export declare function useRemoteSearch({ query, search, }: UseRemoteSearchOptions): UseRemoteSearchReturn;