import { ColumnDef, SortingState } from '@tanstack/react-table'; export type DataTableState = { limit: number; cursor?: string | null; sorting: DataTableSortingState; }; export type DataTableColumnDef = ColumnDef & { meta?: { className?: string; sortKey?: string; }; }; export type DataTableSortingState = SortingState; export type DataTableProps = { columns: DataTableColumnDef[]; data?: TData[] | null; isLoading?: boolean; onRowClick?: (row: TData) => void; sorting?: DataTableSortingState; onSortingChange?: (sorting: DataTableSortingState) => void; } & DataTablePaginationProps; export type DataTablePaginationProps = { limit?: number; onLimitChange?: (limit: number) => void; pageInfo?: { totalCount?: number; next?: string | null; previous?: string | null; }; onCursorChange: (cursor: string | null, direction: 'next' | 'previous') => void; isLoading?: boolean; };