"use client"; import { useEffect, useState } from "react"; import Editor from "@monaco-editor/react"; import { Button } from "@/components/ui/button"; import { Play, Download } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { ProjectFile } from "@/types/project"; interface CodeEditorProps { files: ProjectFile[]; activeFile: string; onFileChange: (fileName: string, newCode: string) => void; onFileSelect: (fileName: string) => void; onExport: () => void; } const CodeEditor = ({ files, activeFile, onFileChange, onFileSelect, onExport }: CodeEditorProps) => { const currentFile = files.find(f => f.name === activeFile); return (