import { AutocompleteItemProps, AutocompleteProps } from '@heroui/react'; import { Control, FieldValues, Path, RegisterOptions } from 'react-hook-form'; export type AutocompleteOptionItem = { value: string | number; label: string; props?: AutocompleteItemProps; } & TExtra; type ACProps = AutocompleteProps>; interface Props extends Omit, "children" | "disableClearable" | "selectedKey" | "defaultSelectedKey" | "onSelectionChange"> { options: AutocompleteOptionItem[]; onSelectItem?(item: AutocompleteOptionItem): void; /** * When true, `options` are treated as a static list and HeroUI filters them locally as you type * (uses `defaultItems`). Leave off when search is handled server-side and you feed a pre-filtered * list via `options` (used as controlled `items`). */ clientFilter?: boolean; /** Selected key (controlled). HeroUI v2's selection API. */ selectedKey?: ACProps["selectedKey"]; /** Initial selected key (uncontrolled). */ defaultSelectedKey?: ACProps["defaultSelectedKey"]; /** Fired when the selected key changes. */ onSelectionChange?: ACProps["onSelectionChange"]; } declare function InputAutocomplete(props: Props): import("react").JSX.Element; declare namespace InputAutocomplete { var WithRHFControl: typeof WithControl; } type WithControlProps = Props & { control: Control; name: Path; rules?: RegisterOptions>; }; declare function WithControl(props: WithControlProps): import("react").JSX.Element; export default InputAutocomplete;