'use strict';

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

var _reactRedux = require('react-redux');

var _RecordBatchPanel = require('../../components/record/RecordBatchPanel');

var _RecordBatchPanel2 = _interopRequireDefault(_RecordBatchPanel);

var _batch = require('../../actions/batch');

var _reducers = require('../../reducers');

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

var mapStateToProps = function mapStateToProps(state, ownProps) {
  var csid = ownProps.csid;


  return {
    perms: (0, _reducers.getUserPerms)(state),
    recordData: (0, _reducers.getRecordData)(state, csid)
  };
};

var mapDispatchToProps = {
  run: _batch.invoke
};

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