import { useEffect, useState } from "react"; import { ChatBubbleLeftIcon } from "@heroicons/react/24/solid"; import { SupportChat } from "./SupportChat"; export function SupportWidget() { const [open, setOpen] = useState(false); const [showBubble, setShowBubble] = useState(false); const [bubbleDismissed, setBubbleDismissed] = useState(false); useEffect(() => { const t = setTimeout(() => setShowBubble(true), 2500); return () => clearTimeout(t); }, []); const handleOpen = () => { setOpen((v) => !v); setBubbleDismissed(true); }; const bubbleVisible = showBubble && !bubbleDismissed && !open; return ( <> {/* Cloud bubble */}
{/* Cloud body */} {/* Tail dots — bottom-right, pointing toward button */} {/* Text overlaid on cloud */}
👋 Need help?
{open && setOpen(false)} />} ); }