import { TableContainer, Paper, Table, TableHead, TableRow, TableCell, TableBody, Pagination, PaginationItem, } from "@mui/material"; import React, { useState } from "react"; import PropTypes from "prop-types"; import "./index.css"; import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded"; import ArrowForwardRoundedIcon from "@mui/icons-material/ArrowForwardRounded"; /** * BasicTable Component * Renders a table with optional pagination. * * @component * @param {Object} props - Component props. * @param {Object} props.data - Data for the table including columns and rows. * @param {Array} props.data.cols - Array of objects for column headers. * @param {number} props.data.cols[].id - Unique identifier for the column. * @param {string} props.data.cols[].name - Name of the column to display as header. * @param {Array} props.data.rows - Array of row objects. * @param {number} props.data.rows[].id - Unique identifier for the row. * @param {Array} props.data.rows[].data - Array of cell data objects for the row. * @param {number} props.data.rows[].data[].id - Unique identifier for the cell. * @param {JSX.Element} props.data.rows[].data[].data - The content to display in the cell. * @param {function} props.data.rows.data.handleClick - Function to call when the row is clicked. * @param {boolean} [props.paginated=false] - Flag to enable pagination. * * @example * const data = { * cols: [ * { id: 1, name: "First Col" }, * { id: 2, name: "Second Col" }, * { id: 3, name: "Third Col" }, * { id: 4, name: "Fourth Col" }, * ], * rows: [ * { * id: 1, * data: [ * { id: 1, data: