/** * External dependencies */ import { __, sprintf } from '@wordpress/i18n'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Label from '@woocommerce/base-components/label'; /** * Internal dependencies */ import { getIndexes } from './utils.js'; import './style.scss'; const Pagination = ( { currentPage, displayFirstAndLastPages, displayNextAndPreviousArrows, pagesToDisplay, onPageChange, totalPages, } ) => { let { minIndex, maxIndex } = getIndexes( pagesToDisplay, currentPage, totalPages ); const showFirstPage = displayFirstAndLastPages && Boolean( minIndex !== 1 ); const showLastPage = displayFirstAndLastPages && Boolean( maxIndex !== totalPages ); const showFirstPageEllipsis = displayFirstAndLastPages && Boolean( minIndex > 3 ); const showLastPageEllipsis = displayFirstAndLastPages && Boolean( maxIndex < totalPages - 2 ); // Handle the cases where there would be an ellipsis replacing one single page if ( showFirstPage && minIndex === 3 ) { minIndex = minIndex - 1; } if ( showLastPage && maxIndex === totalPages - 2 ) { maxIndex = maxIndex + 1; } const pages = []; if ( minIndex && maxIndex ) { for ( let i = minIndex; i <= maxIndex; i++ ) { pages.push( i ); } } return (
\nVeerpenseel
\n
Veerpenseel<\/p>\n","protected":false},"featured_media":5665,"comment_status":"open","ping_status":"closed","template":"","meta":[],"product_cat":[621,715,739],"product_tag":[],"class_list":{"0":"post-5660","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-gezondheid-and-persoonlijke-verzorging","7":"product_cat-spanking-and-teasing","8":"product_cat-teasers","9":"pa_brand-merk-lelo","11":"first","12":"instock","13":"shipping-taxable","14":"product-type-external"},"yoast_head":"\n