Liferay.Loader.define("data-engine-js-components-web@1.0.112/js/custom/form/thunks/previousPage.es",["module","exports","require","../../../core/actions/eventTypes.es","../../../utils/evaluation.es"],(function(e,a,t){window;Object.defineProperty(a,"__esModule",{value:!0}),a.default=function previousPage({activePage:e,defaultLanguageId:a,editingLanguageId:t,formId:n,groupId:r,pages:s,portletNamespace:d,rules:l,selectedPage:u,title:g,viewMode:p}){return f=>{(0,i.evaluate)(null,{activePage:e,defaultLanguageId:a,editingLanguageId:t,formId:n,groupId:r,nextPage:e-1,pages:s,portletNamespace:d,previousPage:e,rules:l,viewMode:p}).then((a=>{let t=e;if("number"==typeof u)t=u;else for(let o=e-1;o>-1;o--)if(a[o].enabled){t=o;break}const i=Math.max(t,0);f({payload:{activePage:i},type:o.EVENT_TYPES.PAGE.CHANGE}),f({payload:a,type:o.EVENT_TYPES.PAGE.UPDATE}),Liferay.fire("ddmFormPageShow",{formId:n,formPageTitle:s[i].title,page:i,title:g});document.getElementsByClassName("ddm-form-pagination")[0].scrollIntoView()}))}};var o=t("../../../core/actions/eventTypes.es"),i=t("../../../utils/evaluation.es")}));
//# sourceMappingURL=previousPage.es.js.map