import { useId } from "react";

interface CheckboxProps {
  checked: boolean;
  disabled?: boolean;
  onChange?: (checked: boolean) => void;
  className?: string;
  id ?:string;
}

export default function CustomCheckBox({
  checked,
  disabled = false,
  onChange,
  className = "",
  id
}: CheckboxProps) {

  const handleChange = (e: any) => {
    onChange?.(e.target.checked);
  };

  return (
    <input
      id={id}
      type="checkbox"
      checked={checked}
      disabled={disabled}
      onChange={handleChange}
      className={`form-checkbox ${className}`}
    />
  );
}
