'use client';
import { MessageCircle } from 'lucide-react';
import { useStoreContext } from './StoreThemeProvider';

export function WhatsAppButton() {
  const { store } = useStoreContext();
  if (!store.social.whatsapp) return null;
  const href = `https://wa.me/${store.social.whatsapp}`;
  return (
    <a
      href={href}
      target="_blank"
      rel="noopener noreferrer"
      className="fixed bottom-5 right-5 z-30 flex h-12 w-12 items-center justify-center rounded-full bg-emerald-500 text-white shadow-lg hover:bg-emerald-600"
      aria-label="Falar no WhatsApp"
    >
      <MessageCircle className="h-6 w-6" />
    </a>
  );
}
