Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/app/components/undo/undoUpdateColSize",["module","exports","require","../../actions/index","../../services/LayoutService"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.undoAction=function undoAction({action:e,store:t}){const{columnConfigs:o,rowItemId:i}=e,{layoutData:c}=t,a=o.reduce(((e,t)=>{const o=c.items[t.itemId];return e[o.itemId]=_objectSpread(_objectSpread({},o),{},{config:t.config}),e}),{}),u=_objectSpread(_objectSpread({},c),{},{items:_objectSpread(_objectSpread({},c.items),a)});return e=>n.default.updateLayoutData({layoutData:u,onNetworkStatus:e,segmentsExperienceId:t.segmentsExperienceId}).then((()=>{e((0,r.updateColSize)({layoutData:u,rowItemId:i}))}))},t.getDerivedStateForUndo=function getDerivedStateForUndo({action:e,state:t}){const{rowItemId:o}=e,{layoutData:r}=t,n=r.items[o];return{columnConfigs:n.children.map((e=>({config:r.items[e].config,itemId:e}))),rowItemId:o}};var r=o("../../actions/index"),n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(o("../../services/LayoutService"));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}}}));
//# sourceMappingURL=undoUpdateColSize.js.map