import React, { ReactNode } from 'react'; import { MessageProps } from '../Message/types'; import { StreamMessage } from '../../context/ChannelStateContext'; import { ChannelUnreadUiState, DefaultStreamChatGenerics } from '../../types/types'; import { ComponentContextValue, CustomClasses } from '../../context'; import { GroupStyle } from './utils'; import { UserResponse } from 'open-chat-js'; export interface RenderMessagesOptions { components: ComponentContextValue; lastReceivedMessageId: string | null; messageGroupStyles: Record; messages: Array>; /** * Object mapping message IDs of own messages to the users who read those messages. */ readData: Record>>; /** * Props forwarded to the Message component. */ sharedMessageProps: SharedMessageProps; /** * Current user's channel read state used to render components reflecting unread state. * It does not reflect the back-end state if a channel is marked read on mount. * This is in order to keep the unread UI when an unread channel is open. */ channelUnreadUiState?: ChannelUnreadUiState; customClasses?: CustomClasses; } export type SharedMessageProps = Omit, MessagePropsToOmit>; export type MessageRenderer = (options: RenderMessagesOptions) => Array; type MessagePropsToOmit = 'channel' | 'groupStyles' | 'initialMessage' | 'lastReceivedId' | 'message' | 'readBy'; export declare function defaultRenderMessages({ channelUnreadUiState, components, customClasses, lastReceivedMessageId: lastReceivedId, messageGroupStyles, messages, readData, sharedMessageProps: messageProps, }: RenderMessagesOptions): React.JSX.Element[]; export {}; //# sourceMappingURL=renderMessages.d.ts.map