import React from "react"; import type { InputPrimitiveProps } from "../../Input/index.js"; import type { MultiAutoCompleteOption } from "../domains/index.js"; import type { Icon } from "../../Icon/index.js"; interface MultiAutoCompletePrimitiveProps { /** * Allows free input of values not present in the options. */ allowFreeInput?: boolean; /** * Indicates if the reset action should be displayed. */ displayResetAction?: boolean; /** * Indicates if the field is disabled. */ disabled?: boolean; /** * Message to display when there are no options. */ emptyMessage?: React.ReactNode; /** * Indicates if the input field is invalid. * Refer to `InputPrimitiveProps["invalid"]` for possible values. */ invalid?: InputPrimitiveProps["invalid"]; /** * Message to display when there are no options loaded or selected. * Use it to invite the user to interact with the autocomplete by typing a value. */ initialMessage?: React.ReactNode; /** * Reference to the input element. */ inputRef?: React.Ref; /** * Accessible label for the command menu. Not shown visibly. */ label?: React.ReactNode; /** * Indicates if the autocomplete is loading options. */ loading?: boolean; /** * Message to display while loading options. */ loadingMessage?: React.ReactNode; /** * Callback triggered when the open state changes. */ onOpenChange?: (open: boolean) => void; /** * Callback triggered when a value has been searched by the user. */ onValueSearch?: (value: string) => void; /** * Callback triggered when the values change. */ onValuesChange: (values: string[]) => void; /** * Callback triggered to reset the values. */ onValuesReset?: () => void; /** * List of options for the autocomplete. */ options?: MultiAutoCompleteOption[]; /** * Custom renderer for the options. */ optionRenderer?: (item: any, index: number) => React.ReactNode; /** * Placeholder text for the input field. */ placeholder?: string; /** * Size of the input field. * Refer to `InputPrimitiveProps["size"]` for possible values. */ size?: InputPrimitiveProps["size"]; /** * Custom renderer for the selected options. */ selectedOptionRenderer?: (item: any, index: number) => React.ReactNode; /** * Icon to be displayed at the start of the input field. */ startIcon?: React.ReactElement | React.ReactElement; /** * Ensures that each value is unique. */ uniqueValues?: boolean; /** * Variant of the input field. * Refer to `InputPrimitiveProps["variant"]` for possible values. */ variant?: InputPrimitiveProps["variant"]; /** * Optional selected items. */ values?: string[]; } declare const MultiAutoCompletePrimitive: ((props: MultiAutoCompletePrimitiveProps) => React.JSX.Element) & { original: (props: MultiAutoCompletePrimitiveProps) => React.JSX.Element; originalName: string; displayName: string; } & { original: ((props: MultiAutoCompletePrimitiveProps) => React.JSX.Element) & { original: (props: MultiAutoCompletePrimitiveProps) => React.JSX.Element; originalName: string; displayName: string; }; originalName: string; displayName: string; } & { createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<((props: MultiAutoCompletePrimitiveProps) => React.JSX.Element) & { original: (props: MultiAutoCompletePrimitiveProps) => React.JSX.Element; originalName: string; displayName: string; }>) => (props: unknown) => React.JSX.Element; }; export { MultiAutoCompletePrimitive, type MultiAutoCompletePrimitiveProps };