"use client"; import { cn } from "@/lib/utils"; import { useOfflineStatus } from "@/hooks/use-offline-status"; /** * The top-bar connection status chip (TASK-0095 R2 — the TASK-0092/0093 chip, * finalized): online = a green dot "Live", reconnecting = amber "Reconnecting…", * offline = the gray "Offline". The a11y label carries the full state * (`aria-label="Connection: offline, 12 changes pending"`). */ export function StatusChip() { const status = useOfflineStatus(); const dot = status.chip === "online" ? "bg-emerald-500" : status.chip === "reconnecting" ? "bg-amber-500" : "bg-zinc-400"; const label = status.chip === "online" ? "Live" : status.chip === "reconnecting" ? "Reconnecting…" : "Offline"; return ( ); }