Liferay.Loader.define("style-book-web@2.0.76/js/style-book-editor/reducers/editorReducer",["module","exports","require","../constants/actionTypes"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function editorReducer(r,t){switch(t.type){case o.SET_DRAFT_STATUS:{const{value:e}=t;return _objectSpread(_objectSpread({},r),{},{draftStatus:e})}case o.SET_TOKEN_VALUES:{const{tokens:e}=t;return _objectSpread(_objectSpread({},r),{},{frontendTokensValues:_objectSpread(_objectSpread({},r.frontendTokensValues),e)})}case o.ADD_UNDO_ACTION:{const{isRedo:o=!1,label:n,name:c,value:a}=t,s=o?r.redoHistory:[],d=r.undoHistory||[];return _objectSpread(_objectSpread({},r),{},{redoHistory:s,undoHistory:[{label:n,name:c,value:a},...d.slice(0,e-1)]})}case o.ADD_REDO_ACTION:{const{label:e,name:o,value:n}=t,c=r.redoHistory||[];return _objectSpread(_objectSpread({},r),{},{redoHistory:[{label:e,name:o,value:n},...c]})}case o.UPDATE_UNDO_REDO_HISTORY:var n,c;return _objectSpread(_objectSpread({},r),{},{redoHistory:null!==(n=t.redoHistory)&&void 0!==n?n:r.redoHistory,undoHistory:null!==(c=t.undoHistory)&&void 0!==c?c:r.undoHistory});default:return r}};var o=t("../constants/actionTypes");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const e=100}}));
//# sourceMappingURL=editorReducer.js.map