Liferay.Loader.define("data-engine-js-components-web@1.0.86/js/custom/form/components/Pagination.es",["module","exports","require","@frontend-taglib-clay$clayui/pagination","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../../core/actions/eventTypes.es","../../../core/hooks/useEvaluate.es","../../../core/hooks/useForm.es","../../../core/hooks/usePage.es","../../../utils/formId.es","../thunks/nextPage.es","../thunks/previousPage.es"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.Pagination=function Pagination({activePage:e,pages:a}){const{containerElement:t}=(0,l.usePage)(),g=(0,u.useForm)(),m=(0,i.useEvaluate)(f.default),p=(0,i.useEvaluate)(d.default);return o.default.createElement(n.default,{className:"ddm-pagination justify-content-center"},o.default.createElement("li",{className:(0,s.default)("page-item",{"visibility-hidden":0===e})},o.default.createElement("button",{className:"page-link",onClick:()=>g(m({activePage:e,formId:(0,c.getFormId)((0,c.getFormNode)(t.current))})),type:"button"},"«",o.default.createElement("span",{className:"sr-only"},Liferay.Language.get("previous")))),a.map(((a,t)=>o.default.createElement(n.default.Item,{active:e===t,disabled:!a.enabled,key:t,onClick:()=>g({payload:{activePage:t},type:r.EVENT_TYPES.PAGE.CHANGE})},"paginated_success"===a.paginationItemRenderer?Liferay.Language.get("success-page"):t+1))),o.default.createElement("li",{className:(0,s.default)("page-item",{"visibility-hidden":e===a.length-1||-1===e})},o.default.createElement("button",{className:"page-link",onClick:()=>g(p({activePage:e,formId:(0,c.getFormId)((0,c.getFormNode)(t.current))})),type:"button"},"»",o.default.createElement("span",{className:"sr-only"},Liferay.Language.get("next")))))};var n=_interopRequireDefault(t("@frontend-taglib-clay$clayui/pagination")),s=_interopRequireDefault(t("liferay!frontend-js-react-web$classnames")),o=_interopRequireDefault(t("liferay!frontend-js-react-web$react")),r=t("../../../core/actions/eventTypes.es"),i=t("../../../core/hooks/useEvaluate.es"),u=t("../../../core/hooks/useForm.es"),l=t("../../../core/hooks/usePage.es"),c=t("../../../utils/formId.es"),d=_interopRequireDefault(t("../thunks/nextPage.es")),f=_interopRequireDefault(t("../thunks/previousPage.es"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=Pagination.es.js.map