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