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, theme } = useFlowStore(); const isDark = theme === 'dark'; 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 border rounded-md cursor-grab transition-colors group ${ isDark ? 'bg-gray-700 border-gray-600 hover:bg-gray-600 hover:border-gray-500' : 'bg-gray-50 border-gray-200 hover:bg-gray-100 hover:border-gray-300' }`} >
{archived.label}
{archived.model}
))} )}
)}
); }; export default LeftSidebar;