"use strict";

exports.__esModule = true;
exports["default"] = exports.createYourOwnEnzymeUpdate = exports.createYourOwnEnzymeReset = exports.createYourOwnEnzymeClose = void 0;
var _reduxAct = require("redux-act");
var _createReducer;
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
// ------------------------------------
// Actions
// ------------------------------------
var createYourOwnEnzymeUpdate = (0, _reduxAct.createAction)("CREATE_YOUR_OWN_ENZYME_UPDATE");
exports.createYourOwnEnzymeUpdate = createYourOwnEnzymeUpdate;
var createYourOwnEnzymeReset = (0, _reduxAct.createAction)("CREATE_YOUR_OWN_ENZYME_RESET");
exports.createYourOwnEnzymeReset = createYourOwnEnzymeReset;
var createYourOwnEnzymeClose = (0, _reduxAct.createAction)("CREATE_YOUR_OWN_ENZYME_CLOSE");

// ------------------------------------
// Reducer
// ------------------------------------
exports.createYourOwnEnzymeClose = createYourOwnEnzymeClose;
var initialValues = {
  name: "例子： Enzyme",
  sequence: "ggatcc",
  chop_top_index: 1,
  chop_bottom_index: 5,
  isOpen: false
};
var _default = (0, _reduxAct.createReducer)((_createReducer = {}, _createReducer[createYourOwnEnzymeClose] = function () {
  return _extends({}, initialValues, {
    isOpen: false
  });
}, _createReducer[createYourOwnEnzymeReset] = function (state, payload) {
  if (payload === void 0) {
    payload = {};
  }
  return _extends({}, initialValues, payload);
}, _createReducer[createYourOwnEnzymeUpdate] = function (state, payload) {
  return payload;
}, _createReducer), initialValues);
exports["default"] = _default;