Interface MessagesModalOptions

Interface defining the props for the MessagesModal component.

interface MessagesModalOptions {
    isMessagesModalVisible: boolean;
    onMessagesClose: (() => void);
    onSendMessagePress?: ((options: SendMessageOptions) => Promise<void>);
    messages: Message[];
    position?:
        | "topLeft"
        | "topRight"
        | "bottomLeft"
        | "bottomRight";
    backgroundColor?: string;
    activeTabBackgroundColor?: string;
    eventType: EventType;
    member: string;
    islevel: string;
    coHostResponsibility: CoHostResponsibility[];
    coHost: string;
    startDirectMessage: boolean;
    directMessageDetails: Participant;
    updateStartDirectMessage: ((start: boolean) => void);
    updateDirectMessageDetails: ((participant: Participant) => void);
    showAlert?: ShowAlert;
    roomName: string;
    socket: Socket<DefaultEventsMap, DefaultEventsMap>;
    chatSetting: string;
}

Properties

isMessagesModalVisible: boolean

Determines if the messages modal is visible.

onMessagesClose: (() => void)

Function to close the messages modal.

onSendMessagePress?: ((options: SendMessageOptions) => Promise<void>)

Function to handle sending messages. Defaults to the imported sendMessage function.

messages: Message[]

Array of message objects to display.

position?:
    | "topLeft"
    | "topRight"
    | "bottomLeft"
    | "bottomRight"

Position of the modal on the screen. Possible values: 'topRight', 'topLeft', 'bottomRight', 'bottomLeft'.

'topRight'
backgroundColor?: string

Background color of the modal.

'#f5f5f5'
activeTabBackgroundColor?: string

Background color of the active tab.

'#7AD2DCFF',
eventType: EventType

Type of the event (e.g., webinar, conference, broadcast, chat).

member: string

Current member's username.

islevel: string

Level of the user.

coHostResponsibility: CoHostResponsibility[]

Array of co-host responsibilities.

coHost: string

Co-host's username.

startDirectMessage: boolean

Flag to start a direct message.

directMessageDetails: Participant

Details of the direct message.

updateStartDirectMessage: ((start: boolean) => void)

Function to update the start direct message flag.

updateDirectMessageDetails: ((participant: Participant) => void)

Function to update direct message details.

showAlert?: ShowAlert

Function to show alerts.

roomName: string

Name of the chat room.

socket: Socket<DefaultEventsMap, DefaultEventsMap>

Socket object for real-time communication.

chatSetting: string

Settings for the chat.