import React from 'react'; import type { EmojiData, NimbleEmojiIndex } from 'emoji-mart'; import type { CommandResponse, UserResponse } from 'stream-chat'; import type { TriggerSettings } from '../MessageInput/DefaultTriggerProvider'; import type { CustomTrigger, DefaultStreamChatGenerics } from '../../types/types'; declare type ObjectUnion = T[keyof T]; export declare type SuggestionCommand = CommandResponse; export declare type SuggestionUser = UserResponse; export declare type SuggestionItemProps = { className: string; component: React.ComponentType<{ entity: EmojiData | SuggestionUser | SuggestionCommand; selected: boolean; }>; item: EmojiData | SuggestionUser | SuggestionCommand; key: React.Key; onClickHandler: (event: React.BaseSyntheticEvent) => void; onSelectHandler: (item: EmojiData | SuggestionUser | SuggestionCommand) => void; selected: boolean; style: React.CSSProperties; value: string; }; export interface SuggestionHeaderProps { currentTrigger: string; value: string; } export declare type SuggestionListProps = ObjectUnion<{ [key in keyof TriggerSettings]: { component: TriggerSettings[key]['component']; currentTrigger: string; dropdownScroll: (element: HTMLDivElement) => void; getSelectedItem: ((item: Parameters[key]['output']>[0]) => void) | null; getTextToReplace: (item: Parameters[key]['output']>[0]) => { caretPosition: 'start' | 'end' | 'next' | number; text: string; key?: string; }; Header: React.ComponentType; onSelect: (newToken: { caretPosition: 'start' | 'end' | 'next' | number; text: string; }) => void; selectionEnd: number; SuggestionItem: React.ComponentType; values: Parameters[key]['dataProvider']>[2]>[0]; className?: string; itemClassName?: string; itemStyle?: React.CSSProperties; style?: React.CSSProperties; value?: string; }; }>; export declare type ChatAutoCompleteProps = { /** Function to override the default submit handler on the underlying `textarea` component */ handleSubmit?: (event: React.BaseSyntheticEvent) => void; /** Function to run on blur of the underlying `textarea` component */ onBlur?: React.FocusEventHandler; /** Function to override the default onChange behavior on the underlying `textarea` component */ onChange?: React.ChangeEventHandler; /** Function to run on focus of the underlying `textarea` component */ onFocus?: React.FocusEventHandler; /** Function to override the default onPaste behavior on the underlying `textarea` component */ onPaste?: (event: React.ClipboardEvent) => void; /** Placeholder for the underlying `textarea` component */ placeholder?: string; /** The initial number of rows for the underlying `textarea` component */ rows?: number; /** The text value of the underlying `textarea` component */ value?: string; /** Function to override the default emojiReplace behavior on the `wordReplace` prop of the `textarea` component */ wordReplace?: (word: string, emojiIndex?: NimbleEmojiIndex) => string; }; export declare const ChatAutoComplete: (props: ChatAutoCompleteProps) => JSX.Element; export {}; //# sourceMappingURL=ChatAutoComplete.d.ts.map