'use strict';

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

var _redux = require('redux');

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

var _scrolling = require('../../../../../common/actions/scrolling');

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

var _presenter2 = _interopRequireDefault(_presenter);

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

function mapStateToProps(state, props) {
  return {
    scrollKey: props.sessionItem.id
  };
}

function mapDispatchToProps(dispatch, props) {
  return {
    scrollToItem: props.scrollToItem || (0, _redux.bindActionCreators)(_scrolling.scrollToItem, dispatch)
  };
}

exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_presenter2.default);