"use client"; import type { ReactNode } from "react"; import { Button } from "@/components/ui/button"; import { Dialog, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogTitle, } from "@/components/ui/dialog"; // A small controlled confirmation dialog built on Dialog (there is no AlertDialog // primitive). Use for destructive actions: the confirm button is `destructive` // by default. onConfirm fires, then the dialog closes. export function ConfirmDialog({ open, onOpenChange, onConfirm, title, description, confirmLabel = "Delete", cancelLabel = "Cancel", variant = "destructive", }: { open: boolean; onOpenChange: (open: boolean) => void; onConfirm: () => void; title: string; description?: ReactNode; confirmLabel?: string; cancelLabel?: string; variant?: "destructive" | "default"; }) { return ( {title} {description && {description}} }> {cancelLabel} ); }