import { Box, FolderSearch, LayoutDashboard, Monitor, Network, Server, Settings, Terminal, User, Activity, TerminalSquare, } from "lucide-react"; import { useTranslation } from "react-i18next"; import { CommandHistoryProvider } from "@/features/terminal/command-history/CommandHistoryContext"; import { Terminal as TerminalFeature } from "@/features/terminal/Terminal"; import { FileManager } from "@/features/file-manager/FileManager"; import { DockerManager } from "@/features/docker/DockerManager"; import { ServerStats } from "@/features/server-stats/ServerStats"; import GuacamoleApp from "@/features/guacamole/GuacamoleApp"; import { DashboardTab } from "@/dashboard/DashboardTab"; import { TunnelTab } from "@/features/tunnel/TunnelTab"; import type { Tab, TabType, Host } from "@/types/ui-types"; import type { SSHHost } from "@/types"; function hostToSSHHost(h: Host): SSHHost { return { id: parseInt(h.id, 10), name: h.name, ip: h.ip, port: h.port, username: h.username, folder: h.folder ?? "", tags: h.tags ?? [], pin: h.pin ?? false, authType: h.authType, password: h.password, key: h.key, keyPassword: h.keyPassword, keyType: h.keyType, credentialId: h.credentialId ? parseInt(h.credentialId, 10) : undefined, terminalConfig: h.terminalConfig, enableTerminal: h.enableTerminal ?? false, enableTunnel: h.enableTunnel ?? false, enableFileManager: h.enableFileManager ?? false, enableDocker: h.enableDocker ?? false, showTerminalInSidebar: true, showFileManagerInSidebar: true, showTunnelInSidebar: true, showDockerInSidebar: true, showServerStatsInSidebar: true, defaultPath: h.defaultPath ?? "", tunnelConnections: [], connectionType: "ssh", createdAt: "", updatedAt: "", } as SSHHost; } function EmptyState({ icon: Icon, messageKey, }: { icon: React.ElementType; messageKey: string; }) { const { t } = useTranslation(); return (