'use client';

import React from 'react';
import { MessageCircle } from 'lucide-react';

interface WhatsAppFabProps {
  whatsapp: string;
}

export default function WhatsAppFab({ whatsapp = '6281234567890' }: WhatsAppFabProps) {
  return (
    <a href={`https://wa.me/${whatsapp}`} target="_blank" rel="noopener noreferrer"
      className="fixed bottom-6 right-6 z-50 flex h-14 w-14 items-center justify-center rounded-full bg-emerald-500 text-white shadow-lg shadow-emerald-500/30 transition-all hover:scale-110 hover:shadow-xl hover:shadow-emerald-500/40 active:scale-95"
      aria-label="Hubungi kami via WhatsApp">
      <span className="absolute inset-0 rounded-full bg-emerald-500 animate-ping opacity-20" />
      <MessageCircle className="h-6 w-6" />
    </a>
  );
}
