"use strict";

exports.__esModule = true;
exports.frameTranslationToggleOn = exports.frameTranslationToggleOff = exports.frameTranslationToggle = exports["default"] = void 0;
exports.getMinimumOrfSize = getMinimumOrfSize;
var _reduxAct = require("redux-act");
var _createMetaAction = _interopRequireDefault(require("./utils/createMetaAction"));
var _createReducer;
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); }
// ------------------------------------
// Actions
// ------------------------------------
var frameTranslationToggle = (0, _createMetaAction["default"])("FRAME_TRANSLATION_TOGGLE");
exports.frameTranslationToggle = frameTranslationToggle;
var frameTranslationToggleOn = (0, _createMetaAction["default"])("FRAME_TRANSLATION_TOGGLE_ON");
exports.frameTranslationToggleOn = frameTranslationToggleOn;
var frameTranslationToggleOff = (0, _createMetaAction["default"])("FRAME_TRANSLATION_TOGGLE_OFF");

// ------------------------------------
// Reducer
// ------------------------------------
exports.frameTranslationToggleOff = frameTranslationToggleOff;
var _default = (0, _reduxAct.createReducer)((_createReducer = {}, _createReducer[frameTranslationToggle] = function (state, payload) {
  var _extends2;
  return _extends({}, state, (_extends2 = {}, _extends2[payload] = !state[payload], _extends2));
}, _createReducer[frameTranslationToggleOn] = function (state, payload) {
  var _extends3;
  return _extends({}, state, (_extends3 = {}, _extends3[payload] = true, _extends3));
}, _createReducer[frameTranslationToggleOff] = function (state, payload) {
  var _extends4;
  return _extends({}, state, (_extends4 = {}, _extends4[payload] = false, _extends4));
}, _createReducer), {
  "1": false,
  "2": false,
  "3": false,
  "-1": false,
  "-2": false,
  "-3": false
});
exports["default"] = _default;
function getMinimumOrfSize(state) {
  return state;
}