import { getFileIcon } from '../services/fileParser';
export default function Editor({ file, codeLines, isGenerating, generationProgress, files, activeFile, onFileSelect }) {
if (!file && !isGenerating) {
return (
What do you want to build?
Describe your website, app, or component and MINDI will generate production-ready code with live preview.
{['Landing Page', 'Dashboard', 'Portfolio', 'E-commerce'].map(tag => (
{tag}
))}
);
}
return (
{/* Tabs */}
{files.length > 0 && (
{files.map(f => (
))}
)}
{/* Generating indicator */}
{isGenerating && (
{generationProgress || 'Generating...'}
)}
{/* Code */}
{codeLines.map((line, i) => (
{i + 1}
{line.text}
))}
{isGenerating && codeLines.length === 0 && (
Waiting for code...
)}
);
}