"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

var _redux = require("redux");

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

var modificationActions = _interopRequireWildcard(require("../../../../actions/modifications"));

var _presenter = _interopRequireDefault(require("./presenter"));

function mapStateToProps(state, props) {
  return {
    workingStimulus: props.stimulus.getWorkingInstance(),
    errorsShowing: state.getIn(['errorsShowing', props.guid], props.errorsShowing || false)
  };
}

function mapDispatchToProps(dispatch) {
  var modActions = (0, _redux.bindActionCreators)(modificationActions, dispatch);
  return {
    modifyStimulus: modActions.modifyStimulus
  };
}

var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_presenter.default);

exports.default = _default;