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


export default function SuccessDangerSwitch({
	className,
	knobClassName,
	disabled,
	...props
}: Readonly<MattrixwvSwitchProps>){
	return (
		<MattrixwvSwitch
			className={clsx(
				className,
				{
					"bg-danger data-checked:bg-success": !disabled,
					"bg-danger-light/80 data-checked:bg-success-light/80": disabled
				}
			)}
			knobClassName={clsx(
				knobClassName,
				{
					"bg-white": !disabled,
					"bg-neutral-light": disabled
				}
			)}
			disabled={disabled}
			{...props}
		/>
	);
}
