{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "z-toggle-switch",
  "title": "Z Toggle Switch",
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://ui.orchid.ai/r/orchid-foundation.json",
    "https://ui.orchid.ai/r/orchid-theme.json"
  ],
  "files": [
    {
      "path": "registry/ui/orchid/spectrum/atoms/z-toggle-switch/z-toggle-switch.tsx",
      "content": "\"use client\";\nimport { cn } from \"../../../lib/ui-utils\";\ntype ZToggleSwitchProps = {\n    checked: boolean;\n    onChange: (checked: boolean) => void;\n    size?: 'sm' | 'md';\n    disabled?: boolean;\n    className?: string;\n};\nconst sizeClasses = {\n    sm: { track: 'h-4 w-7', thumb: 'size-3', translate: 'translate-x-3' },\n    md: { track: 'h-5 w-9', thumb: 'size-4', translate: 'translate-x-4' },\n};\nexport default function ZToggleSwitch({ checked, onChange, size = 'md', disabled = false, className, }: ZToggleSwitchProps) {\n    const s = sizeClasses[size];\n    return (<button type=\"button\" role=\"switch\" aria-checked={checked} disabled={disabled} onClick={() => onChange(!checked)} className={cn('focus-visible:ring-neutral-strong relative inline-flex shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2', checked ? 'bg-accent' : 'bg-surface-strong', disabled && 'cursor-not-allowed opacity-50', s.track, className)}>\n      <span className={cn('pointer-events-none inline-block rounded-full bg-white shadow-sm ring-0 transition-transform', checked ? s.translate : 'translate-x-0', s.thumb)}/>\n    </button>);\n}\n",
      "type": "registry:ui",
      "target": "@ui/orchid/spectrum/atoms/z-toggle-switch/z-toggle-switch.tsx"
    }
  ],
  "type": "registry:ui"
}