import type { MattrixwvSwitchProps } from "$/types/InputTypes";
import clsx from "clsx";
import { forwardRef } from "react";
import MattrixwvSwitch from "./MattrixwvSwitch";


const InfoSwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
	className,
	knobClassName,
	disabled,
	...props
}, ref ) => {
	return (
		<MattrixwvSwitch
			className={clsx(
				"bg-gray-400",
				className,
				{
					"data-checked:bg-info": !disabled,
					"data-checked:bg-info-light/80": disabled
				}
			)}
			knobClassName={clsx(
				knobClassName,
				{
					"bg-white": !disabled,
					"bg-neutral-light": disabled
				}
			)}
			disabled={disabled}
			ref={ref}
			{...props}
		/>
	);
});

InfoSwitch.displayName = "InfoSwitch";

export default InfoSwitch;
