"use strict";

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

var _actionCodes = require("../constants/actionCodes");

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

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

    default:
      return state;
  }
};

exports.default = _default;

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