"use client" import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog" import { AlertTriangle } from "lucide-react" interface GenerationWarningDialogProps { open: boolean onOpenChange: (open: boolean) => void memberName: string relationType: 'father' | 'mother' onConfirm: () => void } /** * 代数重新计算警告对话框 * 当用户尝试给第1代成员(始祖)添加父母时显示此对话框 */ export function GenerationWarningDialog({ open, onOpenChange, memberName, relationType, onConfirm, }: GenerationWarningDialogProps) { const relationText = relationType === 'father' ? '父亲' : '母亲' const handleConfirm = () => { onOpenChange(false) onConfirm() } return (
全族代数将重新计算

您正在给 {memberName} 添加{relationText}, 这将导致全族代数重新计算

代数变化说明:
原第1代将变为第2代,以此类推。新添加的{relationText}将成为新的第1代始祖。

此操作不可撤销,请确认是否继续?

取消 确认添加
) }