{"version":3,"file":"shared-lib.CpyEuzSP.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/cYtdg7rvdSyXJqdxdNKv/NT7ibyvgqq6NjLIlSoDn/WhatsAppFloat_3.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 62\n * @framerIntrinsicHeight 62\n */export default function WhatsAppFloat(props){const{phoneNumber,message,bottomOffset,rightOffset,size,backgroundColor,iconColor,showPulse}=props;const[isHovered,setIsHovered]=useState(false);const[mounted,setMounted]=useState(false);useEffect(()=>{setMounted(true);},[]);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const href=\"https://wa.me/\"+phoneNumber+\"?text=\"+encodeURIComponent(message);const handleClick=()=>{if(typeof window===\"undefined\")return;const w=window;const payload={button_location:\"sticky_float\",page_path:window.location.pathname,page_location:window.location.href,phone_number:phoneNumber};if(typeof w.gtag===\"function\"){w.gtag(\"event\",\"whatsapp_click\",payload);}else if(Array.isArray(w.dataLayer)){w.dataLayer.push({event:\"whatsapp_click\",...payload});}};const iconSvg=/*#__PURE__*/_jsx(\"svg\",{width:size*.55,height:size*.55,viewBox:\"0 0 24 24\",fill:iconColor,\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z\"})});if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,borderRadius:\"50%\",background:backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 4px 16px rgba(0,0,0,0.2)\"},children:iconSvg});}const button=/*#__PURE__*/_jsxs(_Fragment,{children:[showPulse&&/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes wa-float-pulse {\n                        0% { transform: scale(1); opacity: 0.5; }\n                        70% { transform: scale(1.6); opacity: 0; }\n                        100% { transform: scale(1.6); opacity: 0; }\n                    }\n                `}),/*#__PURE__*/_jsxs(\"a\",{href:href,target:\"_blank\",rel:\"noopener noreferrer\",\"aria-label\":\"Chat with Dr. Bravo on WhatsApp\",onClick:handleClick,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{position:\"fixed\",bottom:bottomOffset+\"px\",right:rightOffset+\"px\",width:size+\"px\",height:size+\"px\",borderRadius:\"50%\",background:backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:isHovered?\"0 6px 24px rgba(0,0,0,0.28)\":\"0 4px 16px rgba(0,0,0,0.2)\",cursor:\"pointer\",transform:isHovered?\"scale(1.08)\":\"scale(1)\",transition:\"transform 200ms ease, box-shadow 200ms ease\",zIndex:2147483647,textDecoration:\"none\",WebkitTapHighlightColor:\"transparent\"},children:[showPulse&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",inset:0,borderRadius:\"50%\",background:backgroundColor,animation:\"wa-float-pulse 2.2s ease-out infinite\",zIndex:-1}}),iconSvg]})]});if(!mounted||typeof document===\"undefined\")return null;return /*#__PURE__*/createPortal(button,document.body);}WhatsAppFloat.displayName=\"WhatsApp Float\";addPropertyControls(WhatsAppFloat,{phoneNumber:{type:ControlType.String,title:\"Phone\",defaultValue:\"971586705466\"},message:{type:ControlType.String,title:\"Message\",defaultValue:\"Hi! I'd like to learn more about Dr. Bravo's procedures.\",displayTextArea:true},size:{type:ControlType.Number,title:\"Size\",defaultValue:62,min:40,max:100,step:1,unit:\"px\"},bottomOffset:{type:ControlType.Number,title:\"Bottom\",defaultValue:24,min:0,max:120,step:1,unit:\"px\"},rightOffset:{type:ControlType.Number,title:\"Right\",defaultValue:24,min:0,max:120,step:1,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"BG Color\",defaultValue:\"#25D366\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#FFFFFF\"},showPulse:{type:ControlType.Boolean,title:\"Pulse\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WhatsAppFloat\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"62\",\"framerIntrinsicHeight\":\"62\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# s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