import React, { Component } from 'react'; import PropTypes from 'prop-types'; import withShortcutHelper from '/imports/ui/components/shortcut-help/service'; import { defineMessages, injectIntl } from 'react-intl'; import * as PluginSdk from 'bigbluebutton-html-plugin-sdk'; import { NavBarItemType } from 'bigbluebutton-html-plugin-sdk/dist/cjs/extensible-areas/nav-bar-item/enums'; import Styled from './styles'; import RecordingIndicator from './nav-bar-graphql/recording-indicator/component'; import TalkingIndicator from '/imports/ui/components/nav-bar/nav-bar-graphql/talking-indicator/component'; import ConnectionStatusButton from '/imports/ui/components/connection-status/button/container'; import ConnectionStatus from '/imports/ui/components/connection-status/component'; import ConnectionStatusService from '/imports/ui/components/connection-status/service'; import OptionsDropdownContainer from './options-dropdown/container'; import TimerIndicatorContainer from '/imports/ui/components/timer/timer-graphql/indicator/component'; import browserInfo from '/imports/utils/browserInfo'; import deviceInfo from '/imports/utils/deviceInfo'; import { PANELS, ACTIONS, LAYOUT_TYPE } from '../layout/enums'; import Button from '/imports/ui/components/common/button/component'; import LeaveMeetingButtonContainer from './leave-meeting-button/container'; import Settings from '/imports/ui/services/settings'; const intlMessages = defineMessages({ toggleUserListLabel: { id: 'app.navBar.userListToggleBtnLabel', description: 'Toggle button label', }, toggleUserListAria: { id: 'app.navBar.toggleUserList.ariaLabel', description: 'description of the lists inside the userlist', }, newMessages: { id: 'app.navBar.toggleUserList.newMessages', description: 'label for toggleUserList btn when showing red notification', }, newMsgAria: { id: 'app.navBar.toggleUserList.newMsgAria', description: 'label for new message screen reader alert', }, defaultBreakoutName: { id: 'app.createBreakoutRoom.room', description: 'default breakout room name', }, leaveMeetingLabel: { id: 'app.navBar.leaveMeetingBtnLabel', description: 'Leave meeting button label', }, }); const propTypes = { presentationTitle: PropTypes.string, hasUnreadMessages: PropTypes.bool, shortcuts: PropTypes.string, breakoutNum: PropTypes.number, breakoutName: PropTypes.string, meetingName: PropTypes.string, pluginNavBarItems: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string, })).isRequired, }; const defaultProps = { presentationTitle: 'Default Room Title', hasUnreadMessages: false, shortcuts: '', }; const renderPluginItems = (pluginItems) => { if (pluginItems !== undefined) { return ( <> { pluginItems.map((pluginItem) => { let returnComponent; switch (pluginItem.type) { case NavBarItemType.BUTTON: returnComponent = (