kitchen-simulator
Version:
It is a kitchen simulator (self-contained micro-frontend).
26 lines (25 loc) • 1.72 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = appReducer;
exports.initialState = void 0;
var _constants = require("../constants");
var _export = require("./export");
var _models = require("../models");
var initialState = exports.initialState = new _models.State();
function appReducer(state, action) {
// /////////
if (_constants.PROJECT_ACTIONS[action.type]) return _export.KitchenConfiguratorProjectReducer.apply(void 0, arguments);
if (_constants.VIEWER2D_ACTIONS[action.type]) return _export.KitchenConfiguratorViewer2dReducer.apply(void 0, arguments);
if (_constants.VIEWER3D_ACTIONS[action.type]) return _export.KitchenConfiguratorViewer3dReducer.apply(void 0, arguments);
if (_constants.ITEMS_ACTIONS[action.type]) return _export.KitchenConfiguratorItemsReducer.apply(void 0, arguments);
if (_constants.HOLE_ACTIONS[action.type]) return _export.KitchenConfiguratorHolesReducer.apply(void 0, arguments);
if (_constants.LINE_ACTIONS[action.type]) return _export.KitchenConfiguratorLinesReducer.apply(void 0, arguments);
if (_constants.AREA_ACTIONS[action.type]) return _export.KitchenConfiguratorAreasReducer.apply(void 0, arguments);
if (_constants.GROUP_ACTIONS[action.type]) return _export.KitchenConfiguratorGroupsReducer.apply(void 0, arguments);
if (_constants.SCENE_ACTIONS[action.type]) return _export.KitchenConfiguratorSceneReducer.apply(void 0, arguments);
if (_constants.VERTEX_ACTIONS[action.type]) return _export.KitchenConfiguratorVerticesReducer.apply(void 0, arguments);
if (_constants.USER_ACTIONS[action.type]) return _export.KitchenConfiguratorUserReducer.apply(void 0, arguments);
return state || initialState;
}