import React, { ReactNode } from 'react';
import { Table, TableHead, TableBody, TableRow, TableHeader } from '@/ui/Table';

interface LeagueMemberTableProps {
  children: ReactNode;
  showActions?: boolean;
}

export function LeagueMemberTable({ children, showActions }: LeagueMemberTableProps) {
  return (
    <Table>
      <TableHead>
        <TableRow>
          <TableHeader>Driver</TableHeader>
          <TableHeader>Rating</TableHeader>
          <TableHeader>Rank</TableHeader>
          <TableHeader>Wins</TableHeader>
          <TableHeader>Role</TableHeader>
          <TableHeader>Joined</TableHeader>
          {showActions && <TableHeader textAlign="right">Actions</TableHeader>}
        </TableRow>
      </TableHead>
      <TableBody>
        {children}
      </TableBody>
    </Table>
  );
}
