import { Trash2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { IconTile } from '@/components/ui/icon-tile'; import type { S3Object } from '@/types'; interface DeleteObjectDialogProps { open: boolean; onOpenChange: (open: boolean) => void; object: S3Object | null; onDeleteObject: (key: string) => Promise; } export function DeleteObjectDialog({ open, onOpenChange, object, onDeleteObject }: DeleteObjectDialogProps) { const handleDelete = async () => { if (!object) return; const success = await onDeleteObject(object.key); if (success) { onOpenChange(false); } }; return ( } tone="destructive" size="md" />
Delete Object Are you sure you want to delete "{object?.key}"? This action cannot be undone.
); }