"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Activity, Bell, Bookmark, Compass, Eye, Globe2, LayoutGrid, Radar, Search, Siren, X, Zap } from "lucide-react"; import { useState } from "react"; import { Mark } from "./brand"; import { DensityToggle } from "./prefs"; import { ThemeToggle } from "./theme"; import { Kbd } from "./ui"; const NAV = [ ["/live", "Live"], ["/breaking", "Breaking"], ["/pulse", "Pulse"], ["/radar", "Radar"], ["/silent", "Silent"], ["/explore", "Explore"], ["/entities", "Entities"], ["/sources", "Sources"], ["/coverage", "Coverage"], ["/watchlists", "Watchlists"], ["/alerts", "Alerts"], ] as const; export function Wordmark() { return ( WebSensor ); } export function TopNav() { const path = usePathname(); const openPalette = (): void => { window.dispatchEvent(new Event("ws:palette")); }; return (
); } /** Mobile bottom navigation (spec §95): Live · Breaking · Explore · Watchlists · More (bottom sheet). */ export function MobileNav() { const path = usePathname(); const [moreFor, setMoreFor] = useState(null); const more = moreFor === path; const setMore = (v: boolean): void => setMoreFor(v ? path : null); const items = [ ["/live", "Live", Activity, path === "/" || path.startsWith("/live")], ["/breaking", "Breaking", Siren, path.startsWith("/breaking")], ["/explore", "Explore", Compass, path.startsWith("/explore")], ["/watchlists", "Watch", Eye, path.startsWith("/watchlists")], ] as const; const moreItems: [string, string, typeof Activity][] = [ ["/pulse", "Pulse", Zap], ["/radar", "Radar", Radar], ["/silent", "Silent changes", LayoutGrid], ["/entities", "Entities", Globe2], ["/sources", "Sources", Globe2], ["/coverage", "Coverage", Globe2], ["/country", "Countries", Globe2], ["/alerts", "Alerts", Bell], ["/bookmarks", "Bookmarks", Bookmark], ["/health", "Health", Activity], ["/api", "API", Zap], ]; return ( <> {more && (
)} ); }