"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _immutable = require("immutable");

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

var _default = function _default() {
  var state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : (0, _immutable.Set)();
  var action = arguments.length > 1 ? arguments[1] : void 0;

  switch (action.type) {
    case _constants.ADD_FEATURES:
      return state.concat(action.payload);

    case _constants.REMOVE_FEATURES:
      return state.subtract(action.payload);

    default:
      return state;
  }
};

exports.default = _default;