import { default as React, ComponentType } from 'react'; import { MessageType, MessageInfo } from 'tuikit-atomicx-react/chat'; import { Message } from './Message'; import { MessageAction, MessageAlignmentType } from '../../types/message'; interface MessageListHandle { scrollToBottom: (behavior?: ScrollBehavior) => void; scrollToMessage: (messageID: string, options?: { behavior?: ScrollBehavior; block?: ScrollLogicalPosition; }) => void; getScrollDistanceFromBottom: () => number; } interface MessageAvatarProps { messageInfo: MessageInfo; } interface MessageListProps { /** message alignment, default is 'two-sided' */ alignment?: MessageAlignmentType | undefined; /** enable read receipt */ enableReadReceipt?: boolean | undefined; /** message actions e.g. recall, delete, etc. Pass an empty array to disable the message context menu. */ messageActionList?: MessageAction[] | undefined; /** max time between message group */ messageAggregationTime?: number | undefined; /** custom filter function */ filter?: ((message: MessageInfo) => boolean) | undefined; /** custom class name */ className?: string | undefined; /** custom style */ style?: React.CSSProperties | undefined; /** custom message component */ Message?: React.ComponentType> | undefined; /** custom message timeline component */ MessageTimeDivider?: React.ComponentType | undefined; /** custom message avatar component */ messageAvatar?: React.ComponentType | undefined; /** custom local notification message component */ LocalNoticeMessage?: React.ComponentType | undefined; /** custom renderers to override built-in message bubble content by MessageType */ messageRenderers?: Partial>> | undefined; /** conversation id */ conversationID?: string | undefined; /** * When alignment is 'two-sided', whether to show the avatar for self-sent messages. * Defaults to false (self-sent messages have no avatar in two-sided mode). */ showSelfAvatar?: boolean | undefined; } declare const MessageList: React.ForwardRefExoticComponent>; export { MessageList }; export type { MessageListProps, MessageListHandle, MessageAvatarProps };