import { Activity, RotateCcw, ShieldAlert } from "lucide-react"; import { Form, Link } from "react-router"; import { Button } from "~/components/ui/button"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "~/components/ui/alert-dialog"; import { cn } from "~/lib/utils"; import { SettingsSection, SettingsStatusPill } from "./SettingsSection"; export function HistoryDangerSection({ active, league, season, isAdmin, isDeleteDialogOpen, onDeleteDialogOpenChange, navigationState, }: { active: boolean; league: { id: string; name: string }; season: { id: string } | null; isAdmin: boolean; isDeleteDialogOpen: boolean; onDeleteDialogOpenChange: (open: boolean) => void; navigationState: "idle" | "loading" | "submitting"; }) { return ( Careful} className={cn("border-destructive/40", !active && "hidden")} >

Audit Log

View the full history of commissioner actions for this season.

{isAdmin && season && (

Reset Draft

Delete all picks, queues, and timers. Draft order is preserved.

Reset the draft? This deletes all draft picks, queues, and timers, then returns the season to pre-draft. This cannot be undone. Cancel
Reset Draft
)}

Delete League

Permanently delete this league and all associated data.

Are you absolutely sure? This permanently deletes {league.name} and all associated data including seasons, teams, and commissioners. Cancel
Delete League
); }