{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "type": "registry:ui",
  "title": "Switch",
  "description": "On/off toggle for settings that apply immediately.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "@wibo/utils"
  ],
  "files": [
    {
      "path": "src/components/switch.tsx",
      "type": "registry:ui",
      "content": "import type { ComponentProps } from \"react\";\nimport { Switch as SwitchPrimitive } from \"radix-ui\";\nimport { cn } from \"@/lib/utils\";\n\n/** On/off toggle for settings that apply immediately. */\nfunction Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n  return (\n    <SwitchPrimitive.Root\n      data-slot=\"switch\"\n      className={cn(\n        \"peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors duration-200 outline-none\",\n        \"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n        \"focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n        \"disabled:cursor-not-allowed disabled:opacity-50\",\n        className,\n      )}\n      {...props}\n    >\n      <SwitchPrimitive.Thumb\n        data-slot=\"switch-thumb\"\n        className=\"pointer-events-none block h-4 w-4 rounded-full bg-card shadow-card ring-0 transition-[translate,width] duration-200 ease-glide group-active/switch:w-5 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 group-active/switch:data-[state=checked]:translate-x-3\"\n      />\n    </SwitchPrimitive.Root>\n  );\n}\n\nexport { Switch };\n"
    }
  ]
}
