import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@/components/ui/alert-dialog';
import { AlertDialogOverlay } from '@radix-ui/react-alert-dialog';
import { DialogProps } from '@radix-ui/react-dialog';
import { X } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { RAGFlowAvatar } from './ragflow-avatar';
import { Separator } from './ui/separator';
interface IProps {
title?: string;
onOk?: (...args: any[]) => any;
onCancel?: (...args: any[]) => any;
hidden?: boolean;
content?: {
title?: string;
node?: React.ReactNode;
};
okButtonText?: string;
cancelButtonText?: string;
}
export function ConfirmDeleteDialog({
children,
title,
onOk,
onCancel,
hidden = false,
onOpenChange,
open,
defaultOpen,
content,
okButtonText,
cancelButtonText,
}: IProps & DialogProps) {
const { t } = useTranslation();
if (hidden) {
return children || <>>;
}
return (