import { useT } from "@agent-native/core/client/i18n"; import type { ReactNode } from "react"; import { AlertDialog as AlertDialogRoot, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog"; export interface AlertDialogProps { open: boolean; onOpenChange: (open: boolean) => void; title: string; description: ReactNode; pending?: boolean; onConfirm: () => void | Promise; } export function AlertDialog({ open, onOpenChange, title, description, pending = false, onConfirm, }: AlertDialogProps) { const t = useT(); return ( {title} {description} {t("common.cancel")} void onConfirm()} > {t("common.delete")} ); }