import { useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { Link, Outlet, useNavigate } from "@tanstack/react-router"; import { useAuth } from "@/auth/store"; import InlineError from "@/lib/InlineError"; import { versionQuery } from "@/lib/queries"; import PauseWidget from "../features/pause/PauseWidget"; import ReadOnlyConfigBanner from "../features/settings/ReadOnlyConfigBanner"; import RestartBanner from "../features/settings/RestartBanner"; import { buttonClass, focusRing } from "@/ui/classes"; const NAV_ITEMS = [ { to: "/", label: "Dashboard" }, { to: "/queries", label: "Query Log" }, { to: "/live", label: "Live" }, { to: "/clients", label: "Clients" }, { to: "/groups", label: "Groups" }, { to: "/blocklists", label: "Blocklists" }, { to: "/rules", label: "Rules" }, { to: "/local-dns", label: "Local DNS" }, { to: "/upstreams", label: "Upstreams" }, { to: "/lookup", label: "Lookup" }, { to: "/settings", label: "Settings" }, ] as const; function NavLinks({ onNavigate }: { onNavigate?: () => void }) { return (