'use client' export type ValidationIssue = { nodeId: string nodeType: 'dialogue' | 'choice' | 'variable' | 'edge' contentSnippet: string undefinedReference: string referenceType: 'character' | 'variable' } type ExportValidationModalProps = { issues: ValidationIssue[] onExportAnyway: () => void onCancel: () => void } export default function ExportValidationModal({ issues, onExportAnyway, onCancel, }: ExportValidationModalProps) { const characterIssues = issues.filter((i) => i.referenceType === 'character') const variableIssues = issues.filter((i) => i.referenceType === 'variable') return (
{issues.length} undefined reference{issues.length !== 1 ? 's' : ''} found. These nodes/edges reference characters or variables that no longer exist.
{issue.contentSnippet}
{issue.contentSnippet}