import React from "react"; import { SxProps, Theme } from "@mui/material"; export interface PaginationProps { total: number; page: number; limit: number; } export interface ColumnDef { headerLabel: string; header: React.ComponentType; headerStyle?: SxProps; cell: React.ComponentType; align?: "inherit" | "left" | "center" | "right" | "justify" | undefined; sx?: SxProps; } export interface RowProps { onClick?: () => void; } export interface PrimaryKeyProps { prefix: string; key: K; } export interface TableProps { data: T[]; state?: S; columns: ColumnDef[]; primaryKey: K | PrimaryKeyProps; noResults?: React.ReactNode; deriveRowProps?: (row: T) => RowProps; pagination?: PaginationProps; setPagination?: React.Dispatch>; handleChangePage?: (event: React.MouseEvent | null, page: number) => void; handleChangeRowsPerPage?: (event: React.ChangeEvent) => void; sxTable?: SxProps; loading?: boolean; hideHeader?: boolean; headerProps?: SxProps; } export interface TableRowProps { row: T; columns: ColumnDef[]; rowProps?: RowProps; } export interface TableHeaderProps { headerProps?: SxProps; columns: ColumnDef[]; }