"use client"

import { Switch } from "@/components/ui/switch"
import { cn } from "@/lib/utils"

interface FormToggleProps {
  checked: boolean
  onChange: (value: boolean) => void
  disabled?: boolean
  className?: string
}

function FormToggle({ checked, onChange, disabled, className }: FormToggleProps) {
  return (
    <Switch
      checked={checked}
      onCheckedChange={onChange}
      disabled={disabled}
      className={cn(className)}
    />
  )
}

export { FormToggle, type FormToggleProps }
