Liferay.Loader.define("@liferay/document-library-web@6.0.154/document_library/js/bulk/reducer.es",["module","exports","require"],(function(e,r,t){window;{function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}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}Object.defineProperty(r,"__esModule",{value:!0}),r.default=function reducer(r,n){switch(n.type){case"check":if(r.current===e.LONG_POLLING)return _objectSpread(_objectSpread({},r),{},{timestamp:Date.now()});break;case"error":return _objectSpread(_objectSpread({},r),{},{current:e.NOTIFY,toast:t.ERROR});case"initialDelayCompleted":if(r.current===e.SHORT_POLLING)return _objectSpread(_objectSpread({},r),{},{current:e.LONG_POLLING,timestamp:Date.now()});break;case"notificationCompleted":if(r.current===e.NOTIFY)return _objectSpread(_objectSpread({},r),{},{current:e.IDLE});break;case"start":if(r.current===e.IDLE)return _objectSpread(_objectSpread({},r),{},{current:e.SHORT_POLLING});break;case"success":return _objectSpread(_objectSpread({},r),{},{current:e.NOTIFY,toast:t.SUCCESS});default:return r}return r},r.STATES=void 0;const e={IDLE:{running:!1,show:!1},LONG_POLLING:{running:!0,show:!0},NOTIFY:{running:!1,show:!1},SHORT_POLLING:{running:!0,show:!1}};r.STATES=e;const t={ERROR:{message:Liferay.Language.get("an-unexpected-error-occurred"),type:"danger"},SUCCESS:{message:Liferay.Language.get("changes-saved")}}}}));
//# sourceMappingURL=reducer.es.js.map