Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/custom/form/components/PaginationControls.es",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$react","../../../core/hooks/useConfig.es","../../../core/hooks/useEvaluate.es","../../../core/hooks/useForm.es","../../../core/hooks/usePage.es","../../../utils/formId.es","../thunks/nextPage.es","../thunks/previousPage.es"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.PaginationControls=function({activePage:e,onClick:t,readOnly:a,strings:f=null,total:m}){const{cancelLabel:g,redirectURL:y,showCancelButton:p,showPartialResultsToRespondents:b,showSubmitButton:h,submitLabel:v}=(0,n.useConfig)(),{containerElement:k}=(0,u.usePage)(),P=(0,r.useEvaluate)(d.default),E=(0,r.useEvaluate)(c.default),L=(0,l.useForm)();return s.default.createElement("div",{className:"lfr-ddm-form-pagination-controls"},e>0&&s.default.createElement(o.default,{className:"float-left lfr-ddm-form-pagination-prev",displayType:"secondary",onClick:()=>L(P({activePage:e,formId:(0,i.getFormId)((0,i.getFormNode)(k.current))})),type:"button"},null!==f?f.previous:Liferay.Language.get("previous")),e<m-1&&s.default.createElement(o.default,{className:"float-left lfr-ddm-form-pagination-next",displayType:"primary",onClick:()=>L(E({activePage:e,formId:(0,i.getFormId)((0,i.getFormNode)(k.current))})),type:"button"},null!==f?f.next:Liferay.Language.get("next")),e===m-1&&!a&&h&&s.default.createElement(o.default,{className:"float-left",id:"ddm-form-submit",type:"submit"},v),p&&!a&&s.default.createElement("div",{className:"ddm-btn-cancel float-right"},s.default.createElement("a",{className:"btn btn-cancel btn-secondary",href:y},g)),b&&s.default.createElement(o.default,{className:"float-right",displayType:"secondary",onClick:()=>t()},Liferay.Language.get("preview-existing-submissions")))};var o=f(a("@frontend-taglib-clay$clayui/button")),s=f(a("liferay!frontend-js-react-web$react")),n=a("../../../core/hooks/useConfig.es"),r=a("../../../core/hooks/useEvaluate.es"),l=a("../../../core/hooks/useForm.es"),u=a("../../../core/hooks/usePage.es"),i=a("../../../utils/formId.es"),c=f(a("../thunks/nextPage.es")),d=f(a("../thunks/previousPage.es"));function f(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=PaginationControls.es.js.map