'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setActiveCalculatorId = exports.newActiveBankEntry = exports.newActiveBank = exports.occludeQuizEntries = exports.merge = exports.set = exports.toggle = exports.clear = undefined;

var _constants = require('../../constants');

var clear = exports.clear = function clear(key) {
  return {
    payload: key,
    type: _constants.CLEAR_UI
  };
};

var toggle = exports.toggle = function toggle(key) {
  return {
    payload: key,
    type: _constants.TOGGLE_UI
  };
};

var set = exports.set = function set(key, value) {
  return {
    payload: { key: key, value: value },
    type: _constants.SET_UI
  };
};

var merge = exports.merge = function merge(key, value) {
  return {
    payload: { key: key, value: value },
    type: _constants.MERGE_UI
  };
};

var occludeQuizEntries = exports.occludeQuizEntries = function occludeQuizEntries(isOccluded) {
  return {
    type: _constants.OCCLUDE_QUIZ_ENTRIES,
    payload: isOccluded
  };
};

var newActiveBank = exports.newActiveBank = function newActiveBank(activeBankId) {
  return {
    type: _constants.ACTIVE_BANK_CHANGE,
    payload: activeBankId
  };
};

var newActiveBankEntry = exports.newActiveBankEntry = function newActiveBankEntry(activeBankEntryId) {
  return {
    type: _constants.ACTIVE_BANK_ENTRY_CHANGE,
    payload: activeBankEntryId
  };
};

var setActiveCalculatorId = exports.setActiveCalculatorId = function setActiveCalculatorId(id) {
  return set('activeCalculatorId', id);
};