import * as React from 'react';
import { type FieldProps } from '@/components/atoms/forms/_shared';
export interface AutocompleteItem {
    /** Unique identifier for the item */
    id: string;
    /** Display label for the item */
    label: string;
    /** Whether the item is disabled */
    disabled?: boolean;
    /** Optional avatar URL for rich Tag rendering in multi-select mode */
    avatar?: string;
    /** Optional icon for rich Tag rendering in multi-select mode */
    icon?: React.ReactNode;
}
export interface AutocompleteGroup {
    /** Unique identifier for the group */
    id: string;
    /** Display label for the group */
    label: string;
    /** Items in this group */
    items: AutocompleteItem[];
}
interface AutocompleteControlProps {
    /** Placeholder text for the input */
    placeholder?: string;
    /** Array of items or groups to display */
    items?: AutocompleteItem[];
    /** Grouped items to display */
    groups?: AutocompleteGroup[];
    /** Current input value (controlled) */
    value?: string;
    /** Default input value (uncontrolled) */
    defaultValue?: string;
    /** Callback when input value changes */
    onValueChange?: (value: string) => void;
    /** Callback when an item is selected */
    onSelect?: (item: AutocompleteItem) => void;
    /** Whether the input is disabled */
    disabled?: boolean;
    /** Whether the input is in error state */
    destructive?: boolean;
    /** Icon displayed at the start (inline-start) of the input - respects RTL */
    startIcon?: React.ReactNode;
    /** Icon displayed at the end (inline-end) of the input - respects RTL */
    endIcon?: React.ReactNode;
    /** Whether to show the dropdown arrow icon (appears after endIcon if both present) */
    showArrow?: boolean;
    /** Whether to show check icon on highlighted item */
    showCheck?: boolean;
    /** Custom filter function */
    filterFn?: (item: AutocompleteItem, inputValue: string) => boolean;
    /** Mode for autocomplete behavior */
    mode?: 'list' | 'both' | 'inline' | 'none';
    /** Whether to auto-highlight the first item */
    autoHighlight?: boolean | 'always';
    /** Whether the popup is open (controlled) */
    open?: boolean;
    /** Default open state (uncontrolled) */
    defaultOpen?: boolean;
    /** Callback when popup open state changes */
    onOpenChange?: (open: boolean) => void;
    /** Additional class name for the root */
    className?: string;
    /** Additional class name for the input */
    inputClassName?: string;
    /** Additional class name for the popup */
    popupClassName?: string;
    /** Text to show when no items match */
    emptyText?: string;
    /** Name attribute for form submission */
    name?: string;
    /** Whether the field is required */
    required?: boolean;
    /** Input size variant */
    size?: 'sm' | 'md' | 'lg';
    /** Enable multi-select mode */
    multiple?: boolean;
    /** Selected items for multi-select mode (controlled) */
    selectedItems?: AutocompleteItem[];
    /** Callback when selected items change in multi-select mode */
    onSelectedItemsChange?: (items: AutocompleteItem[]) => void;
    /** Custom render function for selected items in multi-select mode */
    renderSelectedItem?: (item: AutocompleteItem, onRemove: () => void) => React.ReactNode;
    /** Allow creating new items from input value (multi-select only) */
    allowCreate?: boolean;
    /** Custom function to create a new item from input value */
    createItem?: (inputValue: string) => AutocompleteItem;
    /** Maximum number of items that can be selected (multi-select only) */
    maxItems?: number;
    /** Prevent selecting duplicate items (default: true) */
    preventDuplicates?: boolean;
    /** Remove last selected item when pressing backspace on empty input (default: true in multi-select) */
    backspaceRemovesLast?: boolean;
    /** Accessible label for the input */
    'aria-label'?: string;
    /** ID of element that labels this input */
    'aria-labelledby'?: string;
    /** ID of element that describes this input */
    'aria-describedby'?: string;
    /** Whether the input is in an invalid state */
    'aria-invalid'?: true;
    /** Whether the input is required */
    'aria-required'?: true;
}
export interface AutocompleteProps extends AutocompleteControlProps, FieldProps {
}
declare function Autocomplete(props: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
declare namespace Autocomplete {
    var displayName: string;
}
export type { AutocompleteItem as AutocompleteOption };
export { Autocomplete };
