import type { ButtonProps } from "$/types/ButtonTypes";
import clsx from "clsx";
import Button from "./Button";


export default function WarningButton(props: ButtonProps){
	const {
		className,
		variant = "standard",
		disabled
	} = props;


	return (
		<Button
			data-testid="mattrixwv-warning-button"
			{...props}
			className={clsx(
				"transition duration-300",
				className,
				//Background
				{
					"bg-yellow-500 hover:bg-yellow-600 active:bg-yellow-700": (variant === "standard") && (!disabled),
					"bg-yellow-300/80": (variant === "standard") && (disabled),
					"bg-transparent": (variant === "outline" || variant === "icon"),
					"bg-transparent hover:bg-yellow-500 active:bg-yellow-600": (variant === "ghost" || variant === "outline-ghost") && (!disabled),
					"bg-transparent ": (variant === "ghost" || variant === "outline-ghost") && (disabled)
				},
				//Outline
				{
					"border-yellow-500 hover:border-yellow-600 active:border-yellow-700": (variant === "standard" || variant === "outline") && (!disabled),
					"border-yellow-300/80": (variant === "standard" || variant === "outline") && (disabled),
					"border-yellow-500 hover:border-yellow-500 active:border-yellow-600": (variant === "outline-ghost") && (!disabled),
					"border-yellow-300/80 ": (variant === "outline-ghost") && (disabled)
				},
				//Text
				{
					"text-black": variant === "standard",
					"text-yellow-500 hover:text-yellow-600 active:text-yellow-700": (variant === "outline" || variant === "icon") && (!disabled),
					"text-yellow-300/80": (variant === "outline" || variant === "icon") && (disabled),
					"text-yellow-500 hover:text-black active:text-black": (variant === "ghost" || variant === "outline-ghost") && (!disabled),
					"text-yellow-300/80 ": (variant === "ghost" || variant === "outline-ghost") && (disabled)
				}
			)}
		/>
	);
}
