Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/layout-data-items/CollectionPagination",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/pagination","@frontend-taglib-clay$clayui/pagination-bar","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../config/index","../../contexts/ControlsContext"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({activePage:e,collectionConfig:t,collectionId:a,onPageChange:f,totalNumberOfItems:u,totalPages:g}){const y=(0,d.useIsActive)(),{displayAllPages:m,numberOfItemsPerPage:p,numberOfPages:b,paginationType:x}=t,w=Math.min(p,c.config.searchContainerPageMaxDelta),_=[u?(e-1)*w+1:0,Math.min(e*w,u),m?u:Math.min(b*w,u)];return s.default.createElement("div",{className:(0,o.default)("page-editor__collection__pagination d-flex",{"page-editor__collection__pagination__overlay":u<1||!y(a),"pt-3 pb-2":"numeric"===x,"py-3":"simple"===x})},"numeric"===x?s.default.createElement(i.default,{className:"flex-grow-1"},s.default.createElement(i.default.Results,null,(0,r.sub)(Liferay.Language.get("showing-x-to-x-of-x-entries"),_)),s.default.createElement(l.ClayPaginationWithBasicItems,{active:e,disableEllipsis:!0,onActiveChange:f,totalPages:Number.isFinite(g)&&g||1})):s.default.createElement("div",{className:"d-flex flex-grow-1 h-100 justify-content-center"},s.default.createElement(n.default,{className:"font-weight-semi-bold mr-3 text-secondary",disabled:1===e,displayType:"unstyled"},s.default.createElement("span",{className:"c-inner",onClick:()=>f(e-1),tabIndex:"-1"},Liferay.Language.get("previous"))),s.default.createElement(n.default,{className:"font-weight-semi-bold ml-3 text-secondary",disabled:e===g,displayType:"unstyled"},s.default.createElement("span",{className:"c-inner",onClick:()=>f(e+1),tabIndex:"-1"},Liferay.Language.get("next")))))};var n=f(a("@frontend-taglib-clay$clayui/button")),l=a("@frontend-taglib-clay$clayui/pagination"),i=f(a("@frontend-taglib-clay$clayui/pagination-bar")),o=f(a("liferay!frontend-js-react-web$classnames")),r=a("frontend-js-web"),s=(f(a("liferay!frontend-js-react-web$prop-types")),f(a("liferay!frontend-js-react-web$react"))),c=a("../../config/index"),d=a("../../contexts/ControlsContext");function f(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=CollectionPagination.js.map