{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lang-switcher",
  "title": "Lang Switcher",
  "author": "Alex Chih (https://alexchih.com)",
  "description": "Locale switcher on the glass pill — the active language is a filled ruri moment. For sites that take Chinese & Japanese seriously.",
  "registryDependencies": [
    "https://washiveil.alexchih.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/washiveil/ui/lang-switcher.tsx",
      "content": "import { cn } from '@/lib/utils';\n\n// Locale switcher on the glass pill ground — the active language is a filled\n// ruri moment, exactly like an active nav item. Styling keys off aria-current\n// so client scripts can re-point the pill without knowing the class list.\n\nexport interface LangSwitcherItem {\n  label: string;\n  href: string;\n  current?: boolean;\n}\n\nexport interface LangSwitcherProps extends React.ComponentProps<'nav'> {\n  items: LangSwitcherItem[];\n}\n\nexport function LangSwitcher({ items, className, ...props }: LangSwitcherProps) {\n  return (\n    <nav\n      aria-label=\"Language\"\n      className={cn(\n        // Lives on glass (the nav pill): a muted track, not glass-on-glass — white-on-white\n        // has no value step in light, so the zone would vanish. muted steps down in light\n        // (ink 6%) and up in dark (white 10%); the surface, not the border, carries the edge.\n        'inline-flex rounded-full border border-muted bg-muted p-1 font-mono text-[0.75rem] backdrop-blur',\n        className,\n      )}\n      {...props}\n    >\n      {items.map((item) => (\n        <a\n          key={item.href}\n          href={item.href}\n          aria-current={item.current ? 'page' : undefined}\n          className={cn(\n            'rounded-full px-3 py-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n            item.current\n              ? 'bg-ruri font-medium text-white dark:bg-ruri-soft dark:text-deep'\n              : 'text-muted-foreground hover:bg-foreground/6 hover:text-foreground dark:hover:bg-white/10',\n          )}\n        >\n          {item.label}\n        </a>\n      ))}\n    </nav>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}