"use strict";

exports.__esModule = true;
exports["default"] = exports.annotationLabelVisibilityToggle = exports.annotationLabelVisibilityShow = exports.annotationLabelVisibilityHide = void 0;
var _createMetaAction = _interopRequireDefault(require("./utils/createMetaAction"));
var _createMergedDefaultStateReducer = _interopRequireDefault(require("./utils/createMergedDefaultStateReducer"));
var _createMergedDefaultS;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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); }
var visibilityInitialValues = {
  features: true,
  parts: true,
  primers: true,
  cutsites: true,
  assemblyPieces: true,
  lineageAnnotations: true,
  warnings: true
};

// ------------------------------------
// Actions
// ------------------------------------
var annotationLabelVisibilityToggle = (0, _createMetaAction["default"])("annotationLabelVisibilityToggle");
exports.annotationLabelVisibilityToggle = annotationLabelVisibilityToggle;
var annotationLabelVisibilityShow = (0, _createMetaAction["default"])("annotationLabelVisibilityShow");
exports.annotationLabelVisibilityShow = annotationLabelVisibilityShow;
var annotationLabelVisibilityHide = (0, _createMetaAction["default"])("annotationLabelVisibilityHide");

// ------------------------------------
// Reducer
// ------------------------------------
exports.annotationLabelVisibilityHide = annotationLabelVisibilityHide;
var _default = (0, _createMergedDefaultStateReducer["default"])((_createMergedDefaultS = {}, _createMergedDefaultS[annotationLabelVisibilityToggle] = function (state, payload) {
  var _extends2;
  return _extends({}, state, (_extends2 = {}, _extends2[payload] = !state[payload], _extends2));
}, _createMergedDefaultS[annotationLabelVisibilityShow] = function (state, payload) {
  var _extends3;
  return _extends({}, state, (_extends3 = {}, _extends3[payload] = true, _extends3));
}, _createMergedDefaultS[annotationLabelVisibilityHide] = function (state, payload) {
  var _extends4;
  return _extends({}, state, (_extends4 = {}, _extends4[payload] = false, _extends4));
}, _createMergedDefaultS), visibilityInitialValues);
exports["default"] = _default;