"use strict";

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

var _constants = require("@instructure/quiz-common/lib/constants");

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

exports.clear = clear;

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

exports.toggle = toggle;

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

exports.set = set;

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

exports.merge = merge;

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

exports.occludeQuizEntries = occludeQuizEntries;

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

exports.newActiveBank = newActiveBank;

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

exports.newActiveBankEntry = newActiveBankEntry;

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

exports.setActiveCalculatorId = setActiveCalculatorId;