'use strict';

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

var _optionList = require('../actions/optionList');

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

  switch (action.type) {
    case _optionList.ADD_OPTION_LISTS:
      return Object.assign({}, state, action.payload);
    default:
      return state;
  }
};

function get(state, optionListName) {
  return state[optionListName];
}