{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "switch",
  "type": "registry:ui",
  "dependencies": [
    "@kobalte/core"
  ],
  "files": [
    {
      "path": "ui/switch.tsx",
      "content": "import type { Component, ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport * as SwitchPrimitive from \"@kobalte/core/switch\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype SwitchProps<T extends ValidComponent = \"div\"> = SwitchPrimitive.SwitchRootProps<T> & {\n  class?: string\n}\n\nconst Switch: Component<SwitchProps> = (props) => {\n  const [local, others] = splitProps(props, [\"class\"])\n  return (\n    <SwitchPrimitive.Root data-slot=\"switch\" {...others}>\n      <SwitchPrimitive.Input\n        class={cn(\n          \"outline-none [&:focus-visible+div]:border-ring [&:focus-visible+div]:ring-[3px] [&:focus-visible+div]:ring-ring/50\"\n        )}\n      />\n      <SwitchPrimitive.Control\n        class={cn(\n          \"inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-input shadow-xs transition-all data-[disabled]:cursor-not-allowed data-[checked]:bg-primary data-[disabled]:opacity-50 dark:bg-input/80 dark:data-[checked]:bg-primary\",\n          local.class\n        )}\n        data-slot=\"switch-control\"\n      >\n        <SwitchPrimitive.Thumb\n          class={cn(\n            \"pointer-events-none block size-4 translate-x-0 rounded-full bg-background shadow-lg ring-0 transition-transform data-[checked]:translate-x-[calc(100%-2px)] dark:bg-foreground dark:data-[checked]:bg-primary-foreground\"\n          )}\n          data-slot=\"switch-thumb\"\n        />\n      </SwitchPrimitive.Control>\n    </SwitchPrimitive.Root>\n  )\n}\n\nexport { Switch }\n",
      "type": "registry:ui"
    }
  ]
}