{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "status-locale-switcher",
  "title": "Status Locale Switcher",
  "description": "Agnostic locale picker. Caller owns value, onValueChange, and label resolution — no next-intl, router, or locale detection",
  "registryDependencies": [
    "button",
    "dropdown-menu",
    "skeleton"
  ],
  "files": [
    {
      "path": "src/components/blocks/status-locale-switcher.tsx",
      "content": "\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuGroup,\n  DropdownMenuItem,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/lib/utils\";\n\nexport type StatusLocaleOption = {\n  /** Locale code, e.g. \"en\", \"fr\". Rendered uppercase as the trigger label. */\n  value: string;\n  /** Human-readable label shown in the dropdown row. Caller decides language. */\n  label: string;\n};\n\n/**\n * StatusLocaleSwitcher — agnostic locale picker.\n *\n * Pure presentation: caller owns `value`, `onValueChange`, and label resolution.\n * No `next-intl`, no router, no locale detection. Renders nothing when\n * `locales.length <= 1` so callers can mount it unconditionally.\n */\nexport function StatusLocaleSwitcher({\n  value,\n  onValueChange,\n  locales,\n  disabled,\n  className,\n  ...props\n}: Omit<\n  React.ComponentProps<typeof DropdownMenuTrigger>,\n  \"value\" | \"onValueChange\"\n> & {\n  value: string;\n  onValueChange: (value: string) => void;\n  locales: StatusLocaleOption[];\n  disabled?: boolean;\n}) {\n  if (locales.length <= 1) return null;\n\n  return (\n    <DropdownMenu>\n      <DropdownMenuTrigger className={cn(className)} asChild {...props}>\n        <Button\n          data-slot=\"status-locale-switcher\"\n          variant=\"ghost\"\n          size=\"icon\"\n          disabled={disabled}\n          className=\"font-mono uppercase\"\n        >\n          {value}\n        </Button>\n      </DropdownMenuTrigger>\n      <DropdownMenuContent align=\"end\" alignOffset={-4}>\n        <DropdownMenuGroup>\n          {locales.map((locale) => (\n            <DropdownMenuItem\n              data-slot=\"status-locale-switcher-item\"\n              key={locale.value}\n              onClick={() => onValueChange(locale.value)}\n            >\n              {locale.label}{\" \"}\n              <span\n                className={cn(\n                  \"ml-auto font-mono uppercase\",\n                  locale.value === value\n                    ? \"text-foreground\"\n                    : \"text-muted-foreground\",\n                )}\n              >\n                {locale.value}\n              </span>\n            </DropdownMenuItem>\n          ))}\n        </DropdownMenuGroup>\n      </DropdownMenuContent>\n    </DropdownMenu>\n  );\n}\n\n/**\n * StatusLocaleSwitcherSkeleton — same footprint as the trigger button.\n * Render while the active locale isn't known yet (e.g. before next-intl\n * hydrates) so the surrounding layout doesn't shift.\n */\nexport function StatusLocaleSwitcherSkeleton({\n  className,\n  ...props\n}: React.ComponentProps<typeof Skeleton>) {\n  return (\n    <Skeleton\n      data-slot=\"status-locale-switcher-skeleton\"\n      className={cn(\"size-9\", className)}\n      {...props}\n    />\n  );\n}\n",
      "type": "registry:ui",
      "target": "components/blocks/status-locale-switcher.tsx"
    }
  ],
  "type": "registry:block"
}