text: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  import {connect} from 'react-redux';
  import {Preferences} from 'mattermost-redux/constants';
  import {getTheme, getBool} from 'mattermost-redux/selectors/entities/preferences';
  import {getCurrentRelativeTeamUrl} from 'mattermost-redux/selectors/entities/teams';
  
  import {getIsRhsExpanded, getIsRhsOpen} from 'selectors/rhs';
  
  import PostMessageView from './post_message_view.jsx';
  
  function mapStateToProps(state) {
      return {
          enableFormatting: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'formatting', true),
          isRHSExpanded: getIsRhsExpanded(state),
          isRHSOpen: getIsRhsOpen(state),
          pluginPostTypes: state.plugins.postTypes,
          theme: getTheme(state),
          currentRelativeTeamUrl: getCurrentRelativeTeamUrl(state),
      };
  }
  
  export default connect(mapStateToProps)(PostMessageView);
  