import React, { useState } from 'react'; import { Fab, Tooltip, Box, Typography } from '@mui/material'; import { IoLogoWhatsapp } from 'react-icons/io'; export const WhatsAppButton: React.FC = () => { const [hovered, setHovered] = useState(false); const phoneNumber = '919999999999'; // Simulated brand WhatsApp contact const message = encodeURIComponent( 'Hi Mani Candles! I am browsing your digital store and would like to inquire about B2C candle delivery or B2B corporate catalogs.' ); const whatsappUrl = `https://wa.me/${phoneNumber}?text=${message}`; return ( setHovered(true)} onMouseLeave={() => setHovered(false)} sx={{ position: 'fixed', bottom: 24, right: { xs: 24, md: 80 }, // Shifted on desktop to make room for the scroll candle zIndex: 1000, display: 'flex', alignItems: 'center', gap: 1.5, }} > {hovered && ( Inquire on WhatsApp )} ); }; export default WhatsAppButton;