{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shell-navigation",
  "title": "Navigation list",
  "description": "A flat list of places a session can reach, one link per item, with the current one marked for assistive technology.",
  "dependencies": [
    "lucide-react@1.43.0"
  ],
  "registryDependencies": [
    "@registrystack/shell-content"
  ],
  "files": [
    {
      "path": "shell/navigation.tsx",
      "content": "import type { LucideIcon } from \"lucide-react\";\nimport { ArrowRight } from \"lucide-react\";\nimport { useShellContent } from \"@/blocks/shell/shell-content\";\n\n/** One entry in a flat, single-level navigation list. */\nexport interface ShellNavItem {\n  path: string;\n  label: string;\n  icon: LucideIcon;\n  /** Extra path prefixes under which this item still counts as current. */\n  under?: readonly string[];\n}\n\nfunction isCurrent(item: ShellNavItem, current: string): boolean {\n  for (const prefix of [item.path, ...(item.under ?? [])])\n    if (current === prefix || current.startsWith(`${prefix}/`)) return true;\n  return false;\n}\n\n/**\n * A flat list of places a session can reach, one link per item. The caller\n * decides which items exist, in what order and under what labels; this\n * block only lays the list out and marks the current one.\n */\nexport function Navigation({\n  items,\n  current,\n}: {\n  items: readonly ShellNavItem[];\n  current: string;\n}) {\n  const c = useShellContent();\n  return (\n    <nav aria-label={c.navMain}>\n      {items.map((item) => (\n        <a\n          key={item.path}\n          href={`#${item.path}`}\n          aria-current={isCurrent(item, current) ? \"page\" : undefined}\n        >\n          <item.icon size={18} />\n          {item.label}\n          <ArrowRight size={14} className=\"nav-arrow\" />\n        </a>\n      ))}\n    </nav>\n  );\n}\n",
      "type": "registry:block",
      "target": "@components/shell/navigation.tsx"
    }
  ],
  "type": "registry:block"
}