import { Box, IconButton } from '@mui/material' import FirstPageIcon from '@mui/icons-material/FirstPage' import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft' import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight' import LastPageIcon from '@mui/icons-material/LastPage' import type { PaginationActionsProps } from '../types' /** * Custom pagination actions with first/prev/next/last buttons */ export function PaginationActions({ count, page, rowsPerPage, onPageChange, }: PaginationActionsProps) { const lastPage = Math.max(0, Math.ceil(count / rowsPerPage) - 1) const handleFirstPage = (event: React.MouseEvent) => { onPageChange(event, 0) } const handlePreviousPage = (event: React.MouseEvent) => { onPageChange(event, page - 1) } const handleNextPage = (event: React.MouseEvent) => { onPageChange(event, page + 1) } const handleLastPage = (event: React.MouseEvent) => { onPageChange(event, lastPage) } return ( = lastPage} aria-label='next page' > = lastPage} aria-label='last page' > ) }