Liferay.Loader.define("data-engine-js-components-web@1.0.55/js/custom/form/thunks/nextPage.es",["module","exports","require","../../../core/actions/eventTypes.es","../../../utils/evaluation.es","../../../utils/visitors.es"],(function(e,a,t){window;Object.defineProperty(a,"__esModule",{value:!0}),a.default=function({activePage:e,defaultLanguageId:a,editingLanguageId:t,formId:o,groupId:d,pages:l,portletNamespace:r,rules:u,viewMode:g}){return p=>{(0,s.evaluate)(null,{activePage:e,defaultLanguageId:a,editingLanguageId:t,formId:o,groupId:d,nextPage:e+1,pages:l,portletNamespace:r,previousPage:e,rules:u,viewMode:g}).then((a=>{let t=!0;if(new n.PagesVisitor(a).mapFields((({valid:a},i,s,n,o)=>{e!==o||a||(t=!1)}),!0,!0),t){const t=a.findIndex((({enabled:a},t)=>a&&t>e)),s=Math.min(t,l.length-1);p({payload:{activePage:s},type:i.EVENT_TYPES.PAGE.CHANGE}),p({payload:a,type:i.EVENT_TYPES.PAGE.UPDATE}),Liferay.fire("ddmFormPageShow",{formId:o,page:s,title:l[s].title})}else p({payload:{newPages:a,pageIndex:e},type:i.EVENT_TYPES.PAGE.VALIDATION_FAILED})}))}};var i=t("../../../core/actions/eventTypes.es"),s=t("../../../utils/evaluation.es"),n=t("../../../utils/visitors.es")}));
//# sourceMappingURL=nextPage.es.js.map