import { Button } from "@/components/ui/button"; import { Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; export function DeleteProjectDialog({ isOpen, onOpenChange, onConfirm, projectNames, }: { isOpen: boolean; onOpenChange: (open: boolean) => void; onConfirm: () => void; projectNames: string[]; }) { const count = projectNames.length; const isSingle = count === 1; const singleName = isSingle ? projectNames[0] : null; return ( { event.preventDefault(); event.stopPropagation(); }} > {singleName ? ( <> {"Delete '"} {singleName} {"'?"} ) : ( `Delete ${count} projects?` )} Warning This will permanently delete{" "} {singleName ? `"${singleName}"` : `${count} projects`} and all associated files.
); }