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


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


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