Liferay.Loader.define("layout-content-page-editor-web@2.0.123/page_editor/plugins/experience/reducers/index", ['module', 'exports', 'require', '../actions', './createExperience', './deleteExperience', './selectExperience', './updateExperience', './updateExperiencesList'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _actions = require("../actions");

    var _createExperience = _interopRequireDefault(require("./createExperience"));

    var _deleteExperience = _interopRequireDefault(require("./deleteExperience"));

    var _selectExperience = _interopRequireDefault(require("./selectExperience"));

    var _updateExperience = _interopRequireDefault(require("./updateExperience"));

    var _updateExperiencesList = _interopRequireDefault(require("./updateExperiencesList"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    var reducer = function reducer(state, action) {
      var nextState = state;

      switch (action.type) {
        case _actions.CREATE_SEGMENTS_EXPERIENCE:
          nextState = (0, _createExperience.default)(nextState, action.payload);
          break;

        case _actions.DELETE_SEGMENTS_EXPERIENCE:
          nextState = (0, _deleteExperience.default)(nextState, action.payload);
          break;

        case _actions.DUPLICATE_SEGMENTS_EXPERIENCE:
          nextState = (0, _createExperience.default)(nextState, action.payload);
          break;

        case _actions.SELECT_SEGMENTS_EXPERIENCE:
          nextState = (0, _selectExperience.default)(nextState, action.payload);
          break;

        case _actions.UPDATE_SEGMENTS_EXPERIENCE:
          nextState = (0, _updateExperience.default)(nextState, action.payload);
          break;

        case _actions.UPDATE_SEGMENTS_EXPERIENCES_LIST:
          nextState = (0, _updateExperiencesList.default)(nextState, action.payload);
          break;

        default:
          break;
      }

      return nextState;
    };

    var _default = reducer;
    exports.default = _default;
    //# sourceMappingURL=index.js.map
  }
});
//# sourceMappingURL=index.js.map