import { useConnectionState } from "@trustgraph/react-provider"; import { useProgressStateStore } from "@trustgraph/react-state"; import { semantic, palette, text, border } from "../../theme"; export function StatusBar() { const connectionState = useConnectionState(); const activity = useProgressStateStore((state) => state.activity); const getStatusDisplay = () => { if (!connectionState) return { color: text.subtle, text: "Initializing..." }; switch (connectionState.status) { case "authenticated": return { color: semantic.success, text: "Authenticated" }; case "connected": return { color: semantic.success, text: "Connected" }; case "unauthenticated": return { color: semantic.info, text: "Connected" }; case "connecting": return { color: palette.amber, text: "Connecting..." }; case "reconnecting": return { color: semantic.warning, text: `Reconnecting (${connectionState.reconnectAttempt}/${connectionState.maxAttempts})...` }; case "failed": return { color: semantic.error, text: "Connection failed" }; default: return { color: text.subtle, text: connectionState.status }; } }; const status = getStatusDisplay(); const activeActivity = activity.size > 0 ? Array.from(activity)[0] : null; return (