import { l as Option, u as OptionLike } from "../../index-C03MgO8e.mjs"; import { i as ThemeColor } from "../../types-CbJroQxH.mjs"; import { ComponentProps, ReactNode, RefObject } from "react"; import { Placement, useInteractions } from "@floating-ui/react"; //#region src/components/autocomplete/AutocompleteOption.d.ts type AutocompleteOptionProps = O; declare const AutocompleteOption: import("react").MemoExoticComponent<(props: AutocompleteOptionProps) => import("react").JSX.Element>; //#endregion //#region src/components/autocomplete/Autocomplete.d.ts interface AutocompleteProps extends ComponentProps<"input"> { icon?: boolean | ReactNode; color?: ThemeColor; /** * render suffix only if selection and searchValue is empty */ noSearchSuffix?: ReactNode; suffix?: ReactNode; placement?: Placement; /** * search string used as value for */ searchValue: string; /** * change handler when typing in the input * or when clicking on an option (the label value is passed) */ onChangeSearchValue: (value: string, selectionLabel: boolean) => void; selection?: O | null; /** * select handler for a selection from the autocomplete's dropdown * the option object is passed when clicking on an option * null value is passed when typing a new character in the input search. */ onChangeSelection: (option: O | null) => void; options: O[]; autocompleteOptionComponent?: (props: AutocompleteOptionProps) => ReactNode; loading?: boolean; clearSearchButton?: boolean; selectOnFocus?: boolean; ref?: RefObject; } declare function Autocomplete({ className, autoFocus, icon, color, noSearchSuffix, suffix, placement, placeholder, selection, onChangeSelection, autocompleteOptionComponent, loading, clearSearchButton, searchValue, onChangeSearchValue, options, selectOnFocus, readOnly, ref, ...rest }: AutocompleteProps): import("react").JSX.Element; //#endregion //#region src/components/autocomplete/SimpleAutocomplete.d.ts interface Props$1 extends Omit, "searchValue" | "onChangeSearchValue" | "loading" | "clearSearchButton" | "selectOnFocus"> {} declare function SimpleAutocomplete({ options, selection, onChangeSelection, ...rest }: Props$1): import("react").JSX.Element; //#endregion //#region src/components/autocomplete/LazyAutocomplete.d.ts interface Props extends Omit, "searchValue" | "onChangeSearchValue" | "options" | "selectOnFocus"> { onChangeSearchValueCallback: (searchValue: string) => Promise; debounce?: number; } declare function LazyAutocomplete({ onChangeSearchValueCallback, debounce, selection, onChangeSelection, ...rest }: Props): import("react").JSX.Element; //#endregion //#region src/components/autocomplete/useAutocompleteContext.d.ts interface AutocompleteContext { activeIndex: number | null; selection: OptionLike | null; getItemProps: ReturnType["getItemProps"]; handleSelect: (index: number | null) => void; } declare const AutocompleteContext: import("react").Context; declare function useAutocomplete(): AutocompleteContext; //#endregion //#region src/components/autocomplete/util.d.ts declare function getOptionLabel(option: OptionLike): string; declare function getOptionValue(option: OptionLike): string | number; //#endregion export { Autocomplete, AutocompleteOption, type AutocompleteProps, LazyAutocomplete, SimpleAutocomplete, getOptionLabel, getOptionValue, useAutocomplete }; //# sourceMappingURL=index.d.mts.map