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


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


	return (
		<Button
			{...props}
			className={clsx(
				"transition duration-300",
				className,
				//Background
				{
					"bg-green-600 hover:bg-green-700 active:bg-green-800": (variant === "standard") && (!disabled),
					"bg-green-400/80": (variant === "standard") && (disabled),
					"bg-transparent": (variant === "outline" || variant === "icon"),
					"bg-transparent hover:bg-green-600 active:bg-green-700": (variant === "ghost" || variant === "outline-ghost") && (!disabled),
					"bg-transparent ": (variant === "ghost" || variant === "outline-ghost") && (disabled)
				},
				//Outline
				{
					"border-green-600 hover:border-green-700 active:border-green-800": (variant === "standard" || variant === "outline") && (!disabled),
					"border-green-400/80": (variant === "standard" || variant === "outline") && (disabled),
					"border-green-600 hover:border-green-600 active:border-green-700": (variant === "outline-ghost") && (!disabled),
					"border-green-400/80 ": (variant === "outline-ghost") && (disabled)
				},
				//Text
				{
					"text-white": variant === "standard",
					"text-green-600 hover:text-green-700 active:text-green-800": (variant === "outline" || variant === "icon") && (!disabled),
					"text-green-400/80": (variant === "outline" || variant === "icon") && (disabled),
					"text-green-600 hover:text-white active:text-white": (variant === "ghost" || variant === "outline-ghost") && (!disabled),
					"text-green-400/80 ": (variant === "ghost" || variant === "outline-ghost") && (disabled)
				}
			)}
		/>
	);
}
