import { type Ref, type ReactElement, type ReactNode } from 'react'; import { type VariantProps } from 'class-variance-authority'; import type { OptionShape } from '../_shared/option'; declare const autocompleteVariants: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; tone?: "default" | "error" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export interface AutocompleteHandle { getValue: () => string | null; getQuery: () => string; getIsOpen: () => boolean; setValue: (value: string | null) => void; setQuery: (query: string) => void; clear: () => void; open: () => void; close: () => void; } type CVAProps = VariantProps; export interface AutocompleteProps extends Pick { loadOptions: (query: string, opts: { signal: AbortSignal; locale: string; }) => Promise[]>; debounceMs?: number; value?: string; defaultValue?: string; onChange?: (value: string) => void; onSelect?: (option: OptionShape) => void; recents?: OptionShape[]; onRecentSelect?: (option: OptionShape) => void; snapOnBlur?: boolean; startAdornment?: ReactNode; endAdornment?: ReactNode; placeholder?: string; disabled?: boolean; readOnly?: boolean; required?: boolean; name?: string; id?: string; className?: string; 'aria-label'?: string; /** * Invalid-state fallback for use OUTSIDE a `` (e.g. an inline * editor). Inside a FormField the context wins. */ 'aria-invalid'?: boolean; /** * Error-message id fallback for use OUTSIDE a ``. Inside a * FormField the context's `describedBy` wins. */ 'aria-describedby'?: string; /** * The input's HTML `autocomplete` token (e.g. `address-level2`), so the * browser can fill the field from a saved address. Text filled in while * the user is in another field is taken as the value without opening * the list or asking for suggestions. Default: `off`. */ autoComplete?: string; } interface AutocompleteComponent { (props: AutocompleteProps & { ref?: Ref; }): ReactElement | null; displayName?: string; } export declare const Autocomplete: AutocompleteComponent; export { autocompleteVariants }; //# sourceMappingURL=autocomplete.d.ts.map