import { ScrollArea } from '@/components/ui/scroll-area' import errorPanelCopy from '@/data/error-panel.json' import { ProjectFile } from '@/types/project' import { ErrorPanelHeader } from '@/components/error-panel/ErrorPanelHeader' import { ErrorPanelEmptyState } from '@/components/error-panel/ErrorPanelEmptyState' import { ErrorPanelFileList } from '@/components/error-panel/ErrorPanelFileList' import { useErrorPanelState } from '@/components/error-panel/useErrorPanelState' interface ErrorPanelProps { files: ProjectFile[] onFileChange: (fileId: string, content: string) => void onFileSelect: (fileId: string) => void } export function ErrorPanel({ files, onFileChange, onFileSelect }: ErrorPanelProps) { const { errors, errorsByFile, errorCount, warningCount, isScanning, isRepairing, scanForErrors, repairAllErrors, repairFileWithContext, repairSingleError, } = useErrorPanelState({ files, onFileChange }) return (