import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils";
import { Button } from "../button";

const buttonVariants = cva(
  cn(
    "w-full",
    "bg-gradient-to-r from-[#3B82F6] to-[#2563EB]",
    "cursor-pointer",
    "inline-flex items-center justify-center gap-2",
    "font-inter text-xl/[24px] font-bold text-primary-foreground",
    "px-[27px] py-5",
    "transition-all",
    "disabled:opacity-30",
    "shadow-blue-glow"
  ),
  {
    variants: {
      cornerRadius: {
        "3xl": "rounded-3xl",
        full: "rounded-full",
      },
    },
    defaultVariants: {
      cornerRadius: "3xl",
    },
  }
);

export type ActionButtonProps = React.ComponentProps<typeof Button> &
  VariantProps<typeof buttonVariants>;

function ActionButton({
  className,
  cornerRadius,
  ...props
}: ActionButtonProps) {
  return (
    <Button
      data-slot="action-button"
      className={cn(buttonVariants({ cornerRadius, className }))}
      {...props}
    />
  );
}

export { ActionButton, buttonVariants };
