'use client'
import { useEngineStore } from '@/store/engineStore'
import { useSSE } from '@/hooks/useSSE'
import { formatUptime, cn } from '@/lib/utils'
export default function StatusBar() {
useSSE()
const { status, uptime_seconds, total_scanned, total_alerts, isOffline } = useEngineStore()
if (isOffline) {
return (
Engine offline — cannot reach server
)
}
const isRunning = status === 'Running'
const isPaused = status === 'Paused'
return (
0 ? 'text-g-amber font-semibold' : 'text-g-muted'} />
)
}
function Stat({ label, value, valueClass = 'text-g-muted', dot }: {
label: string; value: string; valueClass?: string; dot?: string
}) {
return (
{dot && }
{label}
{value}
)
}