clickChat

Toggles the visibility of the chat modal based on the current state and event settings.

  • If the modal is already visible, it will be closed.

  • If the modal is not visible, it checks whether chat is allowed based on the event settings and participant level.

  • If chat is not allowed, an alert will be shown.

Example Usage:

clickChat(
options = ClickChatOptions(
isMessagesModalVisible = false,
updateIsMessagesModalVisible = { isVisible -> setIsMessagesModalVisible(isVisible) },
chatSetting = "allow",
islevel = "1",
showAlert = { message, type, duration -> showAlertFunction(message, type, duration) }
)
)