import { ChipProps } from '../../atoms/Chip/Chip.types'; import { CheckboxItemProps } from '../../atoms/CheckboxItem/CheckboxItem.types'; import { OptionLike, OptionLikeKey } from './ChipInput.types'; /** * Normalizes string array or OptionLike array to OptionLike array */ export declare const normalizeToOptionLike: (options: string[] | OptionLike[]) => OptionLike[]; /** * Normalizes string array or OptionLike array to OptionLikeKey array */ export declare const normalizeToOptionLikeKey: (options: string[] | OptionLike[]) => OptionLikeKey[]; /** * Creates chip props for a selected value using OptionLike */ export declare const createChipProps: (option: OptionLike, onRemove: (key: OptionLikeKey) => void, className?: string) => ChipProps; /** * Creates checkbox item props for context menu options using OptionLike */ export declare const createCheckboxItemProps: (option: OptionLike, isChecked: boolean, onSelect: (key: OptionLikeKey) => void, className?: string) => CheckboxItemProps; /** * Toggles an option key in the selected keys array */ export declare const toggleOptionInArray: (selectedKeys: OptionLikeKey[], optionKey: OptionLikeKey) => OptionLikeKey[]; /** * Adds a new OptionLike to available options if it doesn't exist */ export declare const addUniqueOption: (availableOptions: OptionLike[], newOption: OptionLike) => OptionLike[]; /** * Handles Enter key press for adding new chips */ export declare const handleEnterKeyForChip: (event: React.KeyboardEvent, inputValue: string, onAddChip: (value: string) => void, onClearInput: () => void) => void; /** * Finds an OptionLike by its key */ export declare const findOptionByKey: (options: OptionLike[], key: OptionLikeKey) => OptionLike | undefined; /** * Converts OptionLikeKey array back to original format (string[] or OptionLike[]) */ export declare const convertKeysToOriginalFormat: (keys: OptionLikeKey[], originalValue: T | undefined, availableOptions: OptionLike[]) => T; /** * Filters options by input value for search functionality */ export declare const filterOptionsByInput: (options: OptionLike[], inputValue: string) => OptionLike[]; /** * Creates an optimistic item for async operations */ export declare const createOptimisticItem: (value: string) => OptionLike; /** * Adds a key to selected keys array */ export declare const addKeyToSelection: (selectedKeys: OptionLikeKey[], keyToAdd: OptionLikeKey) => OptionLikeKey[]; /** * Removes a key from selected keys array */ export declare const removeKeyFromSelection: (selectedKeys: OptionLikeKey[], keyToRemove: OptionLikeKey) => OptionLikeKey[]; /** * Replaces a temporary key with a real key in selected keys array */ export declare const replaceKeyInSelection: (selectedKeys: OptionLikeKey[], oldKey: OptionLikeKey, newKey: OptionLikeKey) => OptionLikeKey[]; /** * Handles async add item operation with optimistic updates */ export declare const handleAsyncAddItem: (inputValue: string, onAddItem: (value: string) => Promise, currentOptions: OptionLike[], currentSelectedKeys: OptionLikeKey[], setOptions: (options: OptionLike[]) => void, setSelectedKeys: (keys: OptionLikeKey[]) => void) => Promise;