import React, { memo } from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component'; import Button from '/imports/ui/components/button/component'; import { Session } from 'meteor/session'; import withShortcutHelper from '/imports/ui/components/shortcut-help/service'; import ChatLogger from '/imports/ui/components/chat/chat-logger/ChatLogger'; import { styles } from './styles.scss'; import MessageForm from './message-form/container'; import TimeWindowList from './time-window-list/container'; import ChatDropdownContainer from './chat-dropdown/container'; const ELEMENT_ID = 'chat-messages'; const intlMessages = defineMessages({ closeChatLabel: { id: 'app.chat.closeChatLabel', description: 'aria-label for closing chat button', }, hideChatLabel: { id: 'app.chat.hideChatLabel', description: 'aria-label for hiding chat button', }, }); const Chat = (props) => { const { chatID, title, messages, partnerIsLoggedOut, isChatLocked, actions, intl, shortcuts, isMeteorConnected, lastReadMessageTime, hasUnreadMessages, scrollPosition, UnsentMessagesCollection, minMessageLength, maxMessageLength, amIModerator, meetingIsBreakout, timeWindowsValues, dispatch, count, syncing, syncedPercent, lastTimeWindowValuesBuild, } = props; const HIDE_CHAT_AK = shortcuts.hidePrivateChat; const CLOSE_CHAT_AK = shortcuts.closePrivateChat; ChatLogger.debug('ChatComponent::render', props); return (