import * as React from "react"; import { useTheme } from "@mui/material/styles"; import Box from "@mui/material/Box"; import Table from "@mui/material/Table"; import TableBody from "@mui/material/TableBody"; import TableCell from "@mui/material/TableCell"; import TableContainer from "@mui/material/TableContainer"; import TableFooter from "@mui/material/TableFooter"; import TablePagination from "@mui/material/TablePagination"; import TableRow from "@mui/material/TableRow"; import Paper from "@mui/material/Paper"; import IconButton from "@mui/material/IconButton"; 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"; interface TablePaginationActionsProps { count: number; page: number; rowsPerPage: number; onPageChange: (event: React.MouseEvent, newPage: number) => void; } export function TablePaginationActionsAll(props: TablePaginationActionsProps) { const theme = useTheme(); const { count, page, rowsPerPage, onPageChange } = props; const handleFirstPageButtonClick = (event: React.MouseEvent) => { onPageChange(event, 0); }; const handleBackButtonClick = (event: React.MouseEvent) => { onPageChange(event, page - 1); }; const handleNextButtonClick = (event: React.MouseEvent) => { onPageChange(event, page + 1); }; const handleLastPageButtonClick = (event: React.MouseEvent) => { onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1)); }; return ( {theme.direction === "rtl" ? : } {theme.direction === "rtl" ? : } = Math.ceil(count / rowsPerPage) - 1} aria-label="next page" > {theme.direction === "rtl" ? : } = Math.ceil(count / rowsPerPage) - 1} aria-label="last page" > {theme.direction === "rtl" ? : } ); }