import { AlertTriangle } from 'lucide-react'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '@/components/ui/alert-dialog'; import { Alert, AlertDescription } from '@/components/ui/alert'; import { ValidationError } from '@/lib/entityValidationSchemas'; interface WarningConfirmDialogProps { open: boolean; onClose: () => void; onProceed: () => void; warnings: ValidationError[]; itemNames: string[]; } export function WarningConfirmDialog({ open, onClose, onProceed, warnings, itemNames, }: WarningConfirmDialogProps) { return ( Validation Warnings The following items have validation warnings. You can proceed with approval, but fixing these issues will improve content quality:
{itemNames.map((name, index) => (
{name}
{warnings .filter((_, i) => i === index || itemNames.length === 1) .map((warning, warnIndex) => (
{warning.field}: {warning.message}
))}
))}
Go Back to Edit Proceed with Approval
); }