import { ReactNode } from 'react';
import { Key } from 'react-aria-components';
export interface LookupProps<T> {
    /** Label shown above the input. */
    readonly label: string;
    /** Placeholder for the input. */
    readonly placeholder?: string;
    /**
     * Minimum number of characters required before `load` is called. Below the
     * threshold, the list renders `minCharsMessage` (or a default) instead.
     * @default 0
     */
    readonly minChars?: number;
    /**
     * Async loader. Called with the current query whenever the user types, as
     * long as the query is at least `minChars` long. An optional `AbortSignal`
     * is forwarded from `useAsyncList` so consumers can cancel in-flight
     * requests when the query changes. Should return an array of items (empty
     * array on error — the consumer handles error reporting).
     */
    readonly load: (query: string, signal?: AbortSignal) => Promise<T[]>;
    /** Return a unique, stable key for an item. */
    readonly getItemKey: (item: T) => Key;
    /**
     * Return the short label shown in the input after an item is selected. Also
     * used as the default text value for accessibility/type-ahead.
     */
    readonly getItemLabel: (item: T) => string;
    /**
     * Return the text value used by react-aria for screen readers and
     * type-ahead matching. Defaults to `getItemLabel`.
     */
    readonly getItemTextValue?: (item: T) => string;
    /** Render the visible content of each item in the list. */
    readonly renderItem: (item: T) => ReactNode;
    /** Called when the user selects an item. */
    readonly onItemSelected: (item: T) => void;
    /**
     * Message shown when the query is long enough but there are no results.
     * @default 'No results'
     */
    readonly emptyState?: string;
    /**
     * Message shown when the user has not typed enough characters. Defaults to
     * a message derived from `minChars`.
     */
    readonly minCharsMessage?: string;
    /** Extra class for the input. */
    readonly inputClassName?: string;
    /** Extra class for the list container. */
    readonly listClassName?: string;
    /**
     * `id` for the underlying `<input>` element. Use this when an external
     * `<label htmlFor="...">` needs to be associated with the field.
     */
    readonly inputId?: string;
}
/**
 * Inline typeahead picker: search asynchronously, navigate results with the
 * keyboard, pick one to trigger an action. Used for "add user to event",
 * "select event", and similar lookup flows where the user is *finding* an
 * existing entity, not filling in a form field.
 *
 * Built on react-aria's `Autocomplete` + `ListBox` + `useAsyncList` and
 * handles the common concerns: loading spinner, min-char threshold, deduping
 * re-queries after selection, and rendering empty/placeholder states.
 *
 * For a modal / Cmd+K variant see `CommandPalette`.
 *
 * @example
 * ```tsx
 * <Lookup<UserDto>
 *   label="Search User"
 *   placeholder="Search by name or email (min 3 characters)"
 *   minChars={3}
 *   load={searchUsers}
 *   getItemKey={u => u.id!}
 *   getItemLabel={u => u.name ?? ''}
 *   getItemTextValue={u => `${u.name} ${u.email}`}
 *   renderItem={u => (
 *     <>
 *       <div className="font-medium">{u.name}</div>
 *       <div className="text-sm text-gray-600">{u.email}</div>
 *     </>
 *   )}
 *   onItemSelected={u => setSelected(u)}
 *   emptyState="No users found"
 * />
 * ```
 */
export declare function Lookup<T>({ label, placeholder, minChars, load, getItemKey, getItemLabel, getItemTextValue, renderItem, onItemSelected, emptyState, minCharsMessage, inputClassName, listClassName, inputId, }: LookupProps<T>): import("react").JSX.Element;
//# sourceMappingURL=Lookup.d.ts.map