'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _immutable = require('immutable');

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

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

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