import type { CheckboxProps } from "$/types/InputTypes";
import clsx from "clsx";
import { forwardRef } from "react";
import MattrixwvCheckbox from "./MattrixwvCheckbox";


const SecondaryCheckbox = forwardRef<HTMLInputElement, CheckboxProps>(({
	className,
	box = true,
	...props
}, ref) => {
	return (
		<MattrixwvCheckbox
			className={clsx(
				className,
				{
					"group-data-checked:bg-secondary group-data-checked:stroke-white": box,
					"group-data-checked:stroke-secondary": !box
				}
			)}
			box={box}
			{...props}
			ref={ref}
		/>
	);
});

SecondaryCheckbox.displayName = "SecondaryCheckbox";

export default SecondaryCheckbox;
