import { MemberState } from "../../../state/ChannelState"; import { MessageState, ParticipantState } from "../../../state/ConversationState"; import { MessageStyle } from "../MessagingCanvas/MessagingCanvas.definitions"; /** * Properties of the Message bubble * * @typedef MessageBubble.MessageBubbleProps * @property {string} conversationSid - The conversation sid. * @property {MessageState} message - An object which represents a single message. * @property {ParticipantState} [participant] - An object defining the properties of a remote client. * @property {MessageStyle} [messageStyle] - Identifies how the message should be displayed. * @property {boolean} [useFriendlyName=true] - An override to use the friendly name passed in participant. * @property {string} [authorName] - A custom author name to be used. * @property {boolean} [hasMarkdownSupport] - If set to true, the body will be parsed as markdown. * @property {Function} [timestampFormatter] - Function that formats timestamp. * @property {boolean} inFocus - Determines whether a message bubble is in focus. */ export interface MessageBubbleProps { channelSid: string; conversationSid: string; message: MessageState; member?: MemberState | { friendlyName: string; }; participant?: ParticipantState | { friendlyName: string; }; messageStyle?: MessageStyle; useFriendlyName?: boolean; authorName?: string; hasMarkdownSupport?: boolean; timestampFormatter?: (timestamp: Date) => string; inFocus: boolean; } /** * Properties of Message bubble children. * * @typedef {MessageBubbleProps} MessageBubble.MessageBubbleChildrenProps * @property {boolean} [isParticipantOfConversation] - Represents if user is a participant of the conversation */ export interface MessageBubbleChildrenProps extends MessageBubbleProps { isParticipantOfConversation?: boolean; isMemberOfChannel?: boolean; } export declare enum MessageBubbleChildrenKeys { header = "header", body = "body", mediaError = "media-error" }