import { Pagination } from "@mui/material";
import { Box } from "@mui/system";
import { LaravelPaginatedData } from "../@types/paginated-data";


export interface Props {
  paginationData?: LaravelPaginatedData;
  onPageChange: any;
}

export default function BasePagination({ paginationData, onPageChange }: Props) {
  return (
    <Box sx={{ m: 2 }} display="flex" justifyContent="flex-end">
      <Pagination count={paginationData?.last_page} page={paginationData?.current_page} variant="outlined" shape="rounded" onChange={onPageChange}/>
    </Box>
  )
}
