import * as React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { Button, IconButton, Tooltip } from '@box/blueprint-web'; import { PointerChevronLeft, PointerChevronRight } from '@box/blueprint-web-assets/icons/Fill'; import messages from '../messages'; import './Pagination.scss'; export interface PaginationControlsProps { handleNextClick: () => void; handlePreviousClick: () => void; hasNextPage: boolean; hasPageEntryStatus?: boolean; hasPreviousPage: boolean; isSmall: boolean; offset?: number; pageSize?: number; totalCount?: number; } const PaginationControls = ({ handleNextClick, handlePreviousClick, hasNextPage, hasPageEntryStatus = true, hasPreviousPage, isSmall, offset = 0, pageSize = 0, totalCount = 0, }: PaginationControlsProps) => { const { formatMessage } = useIntl(); const startEntryIndex = offset + 1; const endEntryIndex = Math.min(offset + pageSize, totalCount); return (