Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/app/components/undo/undoUpdateItemConfig",["module","exports","require","../../actions/updateItemConfig","../../services/LayoutService","../../utils/setIn"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.undoAction=function undoAction({action:e,store:t}){const{config:n,itemId:u,pageContents:r}=e,{layoutData:d}=t,s=(0,a.setIn)(d,["items",u,"config"],n);return e=>i.default.updateLayoutData({layoutData:s,onNetworkStatus:e,segmentsExperienceId:t.segmentsExperienceId}).then((()=>{e((0,o.default)({itemId:u,layoutData:s,overridePreviousConfig:!0,pageContents:r}))}))},t.getDerivedStateForUndo=function getDerivedStateForUndo({action:e,state:t}){const{itemId:n,pageContents:o}=e,{layoutData:i}=t;return{config:i.items[n].config,itemId:n,pageContents:o}};var o=_interopRequireDefault(n("../../actions/updateItemConfig")),i=_interopRequireDefault(n("../../services/LayoutService")),a=n("../../utils/setIn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=undoUpdateItemConfig.js.map