text: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  import {connect} from 'react-redux';
  import {bindActionCreators} from 'redux';
  
  import {updateUserActive, revokeAllSessionsForUser, promoteGuestToUser, demoteUserToGuest} from 'mattermost-redux/actions/users';
  import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
  import {getBotAccounts} from 'mattermost-redux/selectors/entities/bots';
  import {loadBots} from 'mattermost-redux/actions/bots';
  import {getLicense} from 'mattermost-redux/selectors/entities/general';
  
  import * as Selectors from 'mattermost-redux/selectors/entities/admin';
  
  import SystemUsersDropdown from './system_users_dropdown.jsx';
  
  function mapStateToProps(state) {
      const bots = getBotAccounts(state);
      const license = getLicense(state);
      return {
          isLicensed: license && license.IsLicensed === 'true',
          config: Selectors.getConfig(state),
          currentUser: getCurrentUser(state),
          bots,
      };
  }
  
  function mapDispatchToProps(dispatch) {
      return {
          actions: bindActionCreators({
              updateUserActive,
              revokeAllSessionsForUser,
              promoteGuestToUser,
              demoteUserToGuest,
              loadBots,
          }, dispatch),
      };
  }
  
  export default connect(mapStateToProps, mapDispatchToProps)(SystemUsersDropdown);
  