Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/page_editor/app/thunks/undo",["module","exports","require","../actions/types","../components/undo/undoActions"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function undo({store:t}){return o=>{if(!t.undoHistory||!t.undoHistory.length)return;const[i,...c]=t.undoHistory||[];o({type:r.UPDATE_UNDO_ACTIONS,undoHistory:c});const undoDispatch=e=>o(_objectSpread(_objectSpread({},e),{},{isUndo:!0,originalType:i.originalType||i.type}));e=e.then((()=>(0,n.undoAction)({action:i,store:t})(undoDispatch,(()=>t))))}};var r=o("../actions/types"),n=o("../components/undo/undoActions");function ownKeys(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(o),!0).forEach((function(t){_defineProperty(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}let e=Promise.resolve()}}));
//# sourceMappingURL=undo.js.map