'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.mapStateToProps = mapStateToProps;

var _reactRedux = require('../../../../common/react-redux');

var _moderation = require('../../../../common/actions/moderation');

var _presenter = require('./presenter');

var _presenter2 = _interopRequireDefault(_presenter);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function mapStateToProps(state) {
  return {
    isOpen: state.getIn(['moderation', 'trayOpen']) || false,
    participantName: state.getIn(['moderation', 'selectedParticipantName'])
  };
}

exports.default = (0, _reactRedux.connect)(mapStateToProps, { closeTray: _moderation.closeTray, onTrayClosed: _moderation.onTrayClosed })(_presenter2.default);