{"version":3,"file":"WhatsAppButton.CX8kYWy3.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/pts6lVvtaXeYEBHaLBIt/vTJU74Jcr1zsKvZwMF6e/WhatsAppButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useMotionValue,useSpring,useReducedMotion}from\"framer-motion\";import{useEffect,useRef,useState}from\"react\";/**\n * WhatsAppButton – floating CTA with magnetic hover, spring scale, and a\n * perpetual subtle pulse ring. Position: fixed, bottom-right.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 56\n * @framerIntrinsicHeight 56\n */export default function WhatsAppButton(props){const[mounted,setMounted]=useState(false);const[hover,setHover]=useState(false);const reduced=useReducedMotion();const ref=useRef(null);const mx=useMotionValue(0);const my=useMotionValue(0);const sx=useSpring(mx,{stiffness:220,damping:18,mass:.6});const sy=useSpring(my,{stiffness:220,damping:18,mass:.6});useEffect(()=>setMounted(true),[]);if(!mounted)return null;const cleanPhone=props.phone.replace(/[^0-9]/g,\"\");const href=`https://wa.me/${cleanPhone}?text=${encodeURIComponent(props.message)}`;function handleMove(e){if(reduced||!ref.current)return;const r=ref.current.getBoundingClientRect();mx.set((e.clientX-(r.left+r.width/2))*.3);my.set((e.clientY-(r.top+r.height/2))*.3);}function reset(){mx.set(0);my.set(0);setHover(false);}return /*#__PURE__*/_jsxs(motion.a,{ref:ref,href:href,target:\"_blank\",rel:\"noopener noreferrer\",onMouseEnter:()=>setHover(true),onMouseLeave:reset,onMouseMove:handleMove,\"aria-label\":\"WhatsApp Chat mit Vintai\",initial:reduced?{opacity:1}:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{type:\"spring\",stiffness:260,damping:22,delay:.6},whileHover:reduced?undefined:{scale:1.08},whileTap:reduced?undefined:{scale:.94},style:{position:\"fixed\",bottom:props.offsetY,right:props.offsetX,width:props.size,height:props.size,borderRadius:\"50%\",background:props.bgColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:hover?`0 12px 40px ${props.bgColor}88`:\"0 6px 20px rgba(0,0,0,0.2)\",zIndex:9999,cursor:\"pointer\",textDecoration:\"none\",x:sx,y:sy},children:[!reduced&&/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":true,style:{position:\"absolute\",inset:0,borderRadius:\"50%\",background:props.bgColor,pointerEvents:\"none\",zIndex:-1},animate:{scale:[1,1.45],opacity:[.35,0]},transition:{duration:2.4,repeat:Infinity,ease:\"easeOut\"}}),/*#__PURE__*/_jsx(\"svg\",{width:props.size*.55,height:props.size*.55,viewBox:\"0 0 24 24\",fill:\"white\",xmlns:\"http://www.w3.org/2000/svg\",style:{position:\"relative\",zIndex:1},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 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-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 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.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 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z\"})}),props.showTooltip&&/*#__PURE__*/_jsx(motion.span,{initial:false,animate:{opacity:hover?1:0,x:hover?0:10},transition:{type:\"spring\",stiffness:400,damping:28},style:{position:\"absolute\",right:props.size+14,top:\"50%\",translateY:\"-50%\",background:\"rgba(0,0,0,0.88)\",color:\"white\",padding:\"8px 14px\",borderRadius:10,fontSize:13,fontWeight:500,whiteSpace:\"nowrap\",pointerEvents:\"none\",fontFamily:\"inherit\",boxShadow:\"0 8px 24px rgba(0,0,0,0.2)\"},children:props.tooltipText})]});}addPropertyControls(WhatsAppButton,{phone:{type:ControlType.String,defaultValue:\"+491773236699\"},message:{type:ControlType.String,displayTextArea:true,defaultValue:\"Hallo Vintai, ich habe Interesse an eurer KI-Automatisierung.\"},bgColor:{type:ControlType.Color,defaultValue:\"#25D366\"},size:{type:ControlType.Number,defaultValue:56,min:40,max:96,step:4},offsetX:{type:ControlType.Number,defaultValue:24,min:0,max:100},offsetY:{type:ControlType.Number,defaultValue:24,min:0,max:100},showTooltip:{type:ControlType.Boolean,defaultValue:true},tooltipText:{type:ControlType.String,defaultValue:\"Schreib uns auf WhatsApp\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WhatsAppButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"56\",\"framerIntrinsicWidth\":\"56\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WhatsAppButton.map"],"mappings":"qQAQG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,EAAQ,GA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