import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { me } from '../initial_state' import { openModal } from '../actions/modal' import { openPopover } from '../actions/popover' import { CX, BREAKPOINT_EXTRA_SMALL, POPOVER_CHAT_SETTINGS, MODAL_CHAT_CONVERSATION_CREATE, } from '../constants' import Layout from './layout' import Responsive from '../features/ui/util/responsive_component' import ResponsiveClassesComponent from '../features/ui/util/responsive_classes_component' import ChatSettingsSidebar from '../features/messages/components/chat_settings_sidebar' import ChatApprovedConversationsSidebar from '../features/messages/components/chat_approved_conversations_sidebar' import FooterBar from '../components/footer_bar' import DefaultNavigationBar from '../components/navigation_bar/default_navigation_bar' import ChatNavigationBar from '../components/navigation_bar/chat_navigation_bar_xs' import ChatMessageScrollingList from '../features/messages/components/chat_message_scrolling_list' import ChatMessageComposeForm from '../features/messages/components/chat_message_compose_form' import ChatConversationRequestApproveBar from '../features/messages/components/chat_conversation_request_approve_bar' class MessagesLayout extends React.PureComponent { handleOpenSettingsOptionsPopover = () => { this.props.onOpenSettingsOptionsPopover() } onClickAdd = () => { this.props.onOpenChatConversationCreateModal() } render() { const { width, title, children, isSettings, showBackBtn, source, currentConversationIsRequest, selectedChatConversationId, } = this.props const isXS = width <= BREAKPOINT_EXTRA_SMALL if (isXS) { if (!selectedChatConversationId && !isSettings) { return (