import { MessageCircle } from "lucide-react";

interface WhatsAppButtonProps {
  variant?: "primary" | "floating";
  text?: string;
  className?: string;
}

const WHATSAPP_URL = "https://wa.me/5515996932661?text=Ol%C3%A1%2C%20vim%20pela%20p%C3%A1gina%20e%20gostaria%20de%20saber%20mais%20sobre%20as%20festas";

export const WhatsAppButton = ({
  variant = "primary",
  text = "Falar com o Só Folia no WhatsApp",
  className = "",
}: WhatsAppButtonProps) => {
  const whatsappUrl = WHATSAPP_URL;

  if (variant === "floating") {
    return (
      <a
        href={whatsappUrl}
        target="_blank"
        rel="noopener noreferrer"
        className="floating-whatsapp"
        aria-label="Chamar no WhatsApp"
      >
        <MessageCircle className="w-7 h-7 text-white fill-white" />
      </a>
    );
  }

  return (
    <a
      href={whatsappUrl}
      target="_blank"
      rel="noopener noreferrer"
      className={`btn-whatsapp ${className}`}
    >
      <MessageCircle className="w-6 h-6" />
      <span>{text}</span>
    </a>
  );
};
