import Editor, { type OnMount } from '@monaco-editor/react'; import { AlertCircle, Trash2 } from 'lucide-react'; interface MonacoWrapperProps { code: string; onChange: (value: string | undefined) => void; onMount: OnMount; theme: 'light' | 'dark'; syntaxErrors: { line: number; message: string }[]; setCode: (code: string) => void; } export function MonacoWrapper({ code, onChange, onMount, theme, syntaxErrors, setCode }: MonacoWrapperProps) { // monacoRef removed as it was unused // Define themes once on mount or when theme prop changes appropriately // For simplicity, we can do it inside a useEffect here if we have access to monaco instance, // but usually it's better to do it once. // However, since we need monaco instance, we'll assume the parent component or this component handles it via onMount/useEffect. // Actually, let's keep the theme definition inside the component for now or rely on the parent to pass the ref if needed. // But better yet, let's expose specific theme logic or keep it self-contained if possible. // The original code defined themes in useEffect when monacoRef was available. return (
Syntax Error
{syntaxErrors[0].message}