{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "type": "registry:ui",
  "description": "Toggle a boolean setting on or off.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "components/ui/switch.tsx",
      "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { Switch as BaseSwitch } from \"@base-ui/react/switch\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\ntype SwitchRootProps = React.ComponentPropsWithoutRef<typeof BaseSwitch.Root>\r\n\r\ntype SwitchA11yProps =\r\n    | { \"aria-label\": string; \"aria-labelledby\"?: string; id?: string }\r\n    | { \"aria-labelledby\": string; \"aria-label\"?: string; id?: string }\r\n    | { id: string; \"aria-label\"?: string; \"aria-labelledby\"?: string }\r\n\r\ntype SwitchProps = Omit<SwitchRootProps, \"aria-label\" | \"aria-labelledby\" | \"id\"> & SwitchA11yProps\r\n\r\nconst Switch = React.forwardRef<\r\n    React.ComponentRef<typeof BaseSwitch.Root>,\r\n    SwitchProps\r\n>(({ className, ...props }, ref) => (\r\n    <BaseSwitch.Root\r\n        className={cn(\r\n            \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-black transition-colors focus-brutal disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-main data-unchecked:bg-white\",\r\n            className\r\n        )}\r\n        {...props}\r\n        ref={ref}\r\n    >\r\n        <BaseSwitch.Thumb className=\"pointer-events-none block h-4 w-4 rounded-full border-2 border-black bg-white ring-0 transition-transform data-checked:translate-x-5 data-checked:bg-black data-unchecked:translate-x-0.5\" />\r\n    </BaseSwitch.Root>\r\n))\r\nSwitch.displayName = \"Switch\"\r\n\r\nexport { Switch }\r\n",
      "type": "registry:ui"
    }
  ]
}