import React__default from 'react';
import PropTypes from 'prop-types';

function PageCount(_ref) {
  var children = _ref.children,
      page = _ref.page,
      perPage = _ref.perPage,
      pageSize = _ref.pageSize,
      total = _ref.total;
  return /*#__PURE__*/React__default.createElement("div", {
    className: "font-semibold text-sm text-gray-800"
  }, children || "".concat((page - 1) * perPage + 1, " - ").concat((page - 1) * perPage + pageSize, " of ").concat(total));
}
PageCount.propTypes = {
  // Pass children instead of the other props to override what is rendered
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
  // What page we're currently on
  page: PropTypes.number,
  // How many records are shown on a page (at most)
  perPage: PropTypes.number,
  // How many records are shown on this page (could be less than perPage)
  pageSize: PropTypes.number,
  // How many records are there total across all pages
  total: PropTypes.number
};

export { PageCount as default };
