{"version":3,"file":"WhatsappButton.B7kvLMA3.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Aj2ndqhauWa7OKmSSCjf/jR3uLoHPcz4gvcKIo4xE/WhatsappButton.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function WhatsappButton(props){const{showOnMobile,showOnDesktop}=props;const[isHovered,setIsHovered]=useState(false);// Format WhatsApp URL\nconst phoneNumber=\"+6282315994893\";const message=encodeURIComponent(\"Halo! Saya tertarik untuk mempelajari lebih lanjut tentang layanan agen AI Anda. Bisakah Anda memberikan informasi lebih lanjut?\");const whatsappUrl=`https://wa.me/${phoneNumber.replace(/[^0-9]/g,\"\")}?text=${message}`;const tooltipText=\"Hubungi kami di Whatsapp\";const handleClick=()=>{window.open(whatsappUrl,\"_blank\");};return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\"},children:/*#__PURE__*/_jsxs(motion.div,{style:{position:\"fixed\",bottom:20,right:20,width:60,height:60,borderRadius:\"50%\",backgroundColor:\"#25D366\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 4px 12px rgba(0,0,0,0.15)\",zIndex:999},initial:{scale:0},animate:{scale:1},whileHover:{scale:1.1,boxShadow:\"0 6px 20px rgba(0,0,0,0.25)\"},whileTap:{scale:.95},transition:{type:\"spring\",stiffness:260,damping:20},onClick:handleClick,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),children:[/*#__PURE__*/_jsx(\"svg\",{width:\"32\",height:\"32\",viewBox:\"0 0 24 24\",fill:\"white\",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 0020.885 3.488\"})}),isHovered&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",bottom:\"76px\",right:\"0\",backgroundColor:\"#374151\",color:\"white\",fontSize:\"14px\",padding:\"8px 12px\",borderRadius:\"8px\",whiteSpace:\"nowrap\",boxShadow:\"0 10px 25px rgba(0,0,0,0.25)\",zIndex:1e3},children:[tooltipText,/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"100%\",right:\"24px\",width:\"0\",height:\"0\",borderLeft:\"4px solid transparent\",borderRight:\"4px solid transparent\",borderTop:\"4px solid #374151\"}})]})]})});}addPropertyControls(WhatsappButton,{phoneNumber:{title:\"Phone Number\",type:ControlType.String,defaultValue:\"1234567890\",placeholder:\"e.g., 1234567890 (with country code, no + or spaces)\"},message:{title:\"Pre-filled Message\",type:ControlType.String,defaultValue:\"Hello! I'm interested in your services.\",placeholder:\"Optional message to pre-fill\"},showOnMobile:{title:\"Show on Mobile\",type:ControlType.Boolean,defaultValue:true},showOnDesktop:{title:\"Show on Desktop\",type:ControlType.Boolean,defaultValue:true},tooltipText:{title:\"Tooltip Text\",type:ControlType.String,defaultValue:\"Hubungi kami di Whatsapp\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WhatsappButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WhatsappButton.map"],"mappings":"gPAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,eAAa,iBAAe,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CACwE,EAAY,iBAAiB,iBAAY,QAAQ,UAAU,GAAG,CAAC,4KAA0H,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,CAAC,SAAsB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,QAAQ,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,MAAM,gBAAgB,UAAU,OAAO,UAAU,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,UAAU,8BAA8B,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,MAAM,IAAI,UAAU,8BAA8B,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,GAAG,CAAC,YAAhiB,CAAC,EAAO,KAAK,EAAY,SAAS,EAAkhB,iBAAiB,EAAa,GAAK,CAAC,iBAAiB,EAAa,GAAM,CAAC,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