import{j as e}from"./ui-vendor-D7Fh8Ky-.js";import{W as a}from"./WhatsAppFormDialog-Cv3vZdFO.js";import{c as s}from"./icons-hyxClt4Z.js";import{u as o}from"./react-vendor-1IeSgoWF.js";import"./dialog-Fn_jVAvk.js";import"./index-Dgq7SbLc.js";import"./supabase-vendor-Dr45T5gF.js";import"./input-GYhtT591.js";import"./label-DK5_6W5r.js";import"./validators-B6ObMgjW.js";import"./useMutation-B-ivytK5.js";import"./registrarLead-Dw0HT5Fo.js";const t=()=>{const t=o();if(t.pathname.startsWith("/admin"))return null;if(/^\/(guincho|chaveiro|reboque)\//.test(t.pathname)){const a=()=>{const e=document.getElementById("formulario");e?e.scrollIntoView({behavior:"smooth",block:"start"}):window.location.hash="#formulario"};return e.jsx("div",{className:"fixed right-6 z-50",style:{bottom:"calc(1.5rem + env(safe-area-inset-bottom, 0px))"},children:e.jsxs("button",{type:"button",onClick:a,"aria-label":"Pedir socorro agora",className:"group flex items-center gap-3 bg-red-600 hover:bg-red-700 text-white shadow-lg hover:shadow-xl transition-all duration-300 rounded-full px-4 py-3 md:px-5 md:py-4",children:[e.jsx(s,{className:"w-6 h-6 md:w-7 md:h-7",strokeWidth:2.2}),e.jsx("span",{className:"font-semibold text-sm whitespace-nowrap",children:"Pedir socorro agora"}),e.jsxs("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-300 opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-red-400"})]})]})})}const r=`Lead Floating WhatsApp - ${"/"===t.pathname?"home":t.pathname.slice(1).replace(/\//g,"-")}`;return e.jsx("div",{className:"fixed right-6 z-50",style:{bottom:"calc(1.5rem + env(safe-area-inset-bottom, 0px))"},children:e.jsx(a,{whatsappUrl:"https://wa.me/558440420088",formName:r,formId:"floating_whatsapp_form",servico:"institucional",message:"Antes de iniciar a conversa, deixe seus dados pra gente continuar mesmo se cair sua chamada. Em seguida abrimos o WhatsApp pra você.",whatsappMessage:`Olá! Vim pelo botão flutuante do site Sempre Comigo (${t.pathname}) e gostaria de conhecer as soluções.`,children:e.jsxs("button",{type:"button","aria-label":"Falar com a Sempre Comigo no WhatsApp",className:"group flex items-center gap-3 bg-[#25D366] hover:bg-[#1ebe5d] text-white shadow-lg hover:shadow-xl transition-all duration-300 rounded-full px-4 py-3 md:px-5 md:py-4",children:[e.jsx(s,{className:"w-6 h-6 md:w-7 md:h-7",strokeWidth:2.2}),e.jsx("span",{className:"hidden md:inline-block font-medium text-sm whitespace-nowrap",children:"Fale conosco"}),e.jsxs("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]})]})})})};export{t as FloatingWhatsAppButton,t as default};