import { StripeTransactionsCard } from "../StripeTransactionsCard";
import { FormInboxCard } from "../FormInboxCard";
import { AutopayManagementCard } from "../AutopayManagementCard";
import { BillApprovalsCard } from "../BillApprovalsCard";
import { TasksListWidget } from "./lists/TasksListWidget";
import { ProjectsListWidget } from "./lists/ProjectsListWidget";
import { RemindersListWidget } from "./lists/RemindersListWidget";
import { AnnouncementsListWidget } from "./lists/AnnouncementsListWidget";

interface Props {
  cardId: string;
}

export default function TableWidget({ cardId }: Props) {
  switch (cardId) {
    case "table_stripe":
      return <StripeTransactionsCard />;
    case "table_autopay":
      return <AutopayManagementCard />;
    case "table_form_inbox":
      return <FormInboxCard />;
    case "table_bill_approvals":
      return <BillApprovalsCard />;
    case "table_tasks":
      return <TasksListWidget />;
    case "table_projects":
      return <ProjectsListWidget />;
    case "table_reminders":
      return <RemindersListWidget />;
    case "table_announcements":
      return <AnnouncementsListWidget />;
    default:
      return <div className="p-4 text-muted-foreground text-sm">Unknown widget</div>;
  }
}
