{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navigation-context",
  "title": "Navigation Context",
  "description": "The selected destination, shared by the navigation bar and the rail.",
  "files": [
    {
      "path": "src/components/ui/navigation-context.ts",
      "content": "import { createContext, useContext } from \"react\"\n\n/**\n * How a destination lays out its icon and label.\n *\n * - `stacked` — the kit's vertical nav item: a 56×32 indicator pill over a\n *   label-medium caption (or a 56×56 circle when the label is hidden).\n * - `inline`  — the kit's horizontal nav item: icon and caption together\n *   inside a 40dp pill.\n * - `row`     — the expanded navigation rail item: a full-width 56dp pill with\n *   a label-large caption.\n */\ntype NavigationItemLayout = \"stacked\" | \"inline\" | \"row\"\n\ntype NavigationContextValue = {\n  focusValue?: string\n  itemLayout?: NavigationItemLayout\n  onValueChange: (value: string) => void\n  setFocusValue?: (value: string) => void\n  value: string\n}\n\nconst NavigationContext = createContext<NavigationContextValue | null>(null)\n\nfunction useNavigation() {\n  const context = useContext(NavigationContext)\n  if (!context) throw new Error(\"Navigation items must be used within a navigation container\")\n  return context\n}\n\nexport { NavigationContext, useNavigation, type NavigationItemLayout }\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "navigation"
  ],
  "type": "registry:ui"
}