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