import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; 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?` )} {isSingle ? "Are you sure you want to delete this project? This action cannot be undone." : `Are you sure you want to delete these ${count} projects? This action cannot be undone.`} ); }