import type { BaseSyntheticEvent } from 'react'; import type { LocalMessage, SortParamRequest, UserResponse } from 'stream-chat'; import type { UserEventHandler } from './hooks'; import type { CustomMentionHandler } from './hooks/useMentionsHandler'; import type { GroupStyle } from '../MessageList/utils'; import type { ReactionsComparator } from '../Reactions/types'; import type { MessageContextValue } from '../../context/MessageContext'; import type { RenderTextFunction } from './renderText'; export type ReactEventHandler = (event: React.BaseSyntheticEvent) => Promise | void; export type MessageProps = { /** The message object. */ message: LocalMessage; /** * Keeps the message list scrolled to the bottom when the scroll height grows, e.g. when an * element appears below the last message. Only used in the `VirtualizedMessageList`. */ autoscrollToBottom?: () => void; /** If true, picking a reaction in the `ReactionSelector` closes the selector. */ closeReactionSelectorOnClick?: boolean; /** Users that have confirmed the message delivery to their device. */ deliveredTo?: UserResponse[]; /** Overrides the date formatting. Receives the original date and returns a string. */ formatDate?: (date: Date) => string; /** * The message's position in its group of consecutive messages from one user: `top`, `middle`, * `bottom` or `single`. The message lists add it to the list item as `str-chat__li--