import React, { useState } from 'react'; import { Folder, FileText, Archive, ChevronLeft, ChevronRight, Trash2, MessageSquare } from 'lucide-react'; import useFlowStore from '../store/flowStore'; interface LeftSidebarProps { isOpen: boolean; onToggle: () => void; } const LeftSidebar: React.FC = ({ isOpen, onToggle }) => { const [activeTab, setActiveTab] = useState<'project' | 'files' | 'archive'>('project'); const { archivedNodes, removeFromArchive, createNodeFromArchive } = useFlowStore(); const handleDragStart = (e: React.DragEvent, archiveId: string) => { e.dataTransfer.setData('archiveId', archiveId); e.dataTransfer.effectAllowed = 'copy'; }; if (!isOpen) { return (
{/* Icons when collapsed */}
); } return (
{/* Header */}

Workspace

{/* Tabs */}
{/* Content Area */}
{activeTab === 'project' && (

Project settings coming soon

)} {activeTab === 'files' && (

File manager coming soon

)} {activeTab === 'archive' && (
{archivedNodes.length === 0 ? (

No archived nodes.
Right-click a node → "Add to Archive"

) : ( <>

Drag to canvas to create a copy

{archivedNodes.map((archived) => (
handleDragStart(e, archived.id)} className="p-2 bg-gray-50 border border-gray-200 rounded-md cursor-grab hover:bg-gray-100 hover:border-gray-300 transition-colors group" >
{archived.label}
{archived.model}
))} )}
)}
); }; export default LeftSidebar;