import React from 'react'; import {Button} from '@/components/ui/button.tsx'; import {Card} from '@/components/ui/card.tsx'; import {Separator} from '@/components/ui/separator.tsx'; import {Plus, Folder, File, Star, Trash2, Edit, Link2, Server, Pin} from 'lucide-react'; interface SSHConnection { id: string; name: string; ip: string; port: number; username: string; isPinned?: boolean; } interface FileItem { name: string; type: 'file' | 'directory' | 'link'; path: string; isStarred?: boolean; } interface ConfigFileSidebarViewerProps { sshConnections: SSHConnection[]; onAddSSH: () => void; onConnectSSH: (conn: SSHConnection) => void; onEditSSH: (conn: SSHConnection) => void; onDeleteSSH: (conn: SSHConnection) => void; onPinSSH: (conn: SSHConnection) => void; currentPath: string; files: FileItem[]; onOpenFile: (file: FileItem) => void; onOpenFolder: (folder: FileItem) => void; onStarFile: (file: FileItem) => void; onDeleteFile: (file: FileItem) => void; isLoading?: boolean; error?: string; isSSHMode: boolean; onSwitchToLocal: () => void; onSwitchToSSH: (conn: SSHConnection) => void; currentSSH?: SSHConnection; } export function FileManagerLeftSidebarFileViewer({ sshConnections, onAddSSH, onConnectSSH, onEditSSH, onDeleteSSH, onPinSSH, currentPath, files, onOpenFile, onOpenFolder, onStarFile, onDeleteFile, isLoading, error, isSSHMode, onSwitchToLocal, onSwitchToSSH, currentSSH, }: ConfigFileSidebarViewerProps) { return (