{"version":3,"file":"SocialModalButton.DyUlNTf-.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/hDUMSwrVo2IN1YJ4z7iL/N2m7M0c4cjjzsPqshtez/SocialModalButton.js"],"sourcesContent":["// Animated \"Message me\" button that opens a modal with social media icons (Instagram, Facebook, WhatsApp, Email)\n// Each icon links to the corresponding platform with smooth animations and microinteractions\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{motion,AnimatePresence}from\"framer-motion\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Social Modal Button\n *\n * @framerIntrinsicWidth 280\n * @framerIntrinsicHeight 70\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SocialModalButton(props){const{buttonText,buttonColor,buttonTextColor,iconColor,iconBackgroundColor,iconAlignment,instagramUrl,facebookUrl,whatsappPhone,email,buttonFont,buttonPadding}=props;const[isOpen,setIsOpen]=useState(false);const toggleModal=()=>{startTransition(()=>setIsOpen(!isOpen));};const whatsappMessage=encodeURIComponent(\"Hello! I would like to inquire about Farlet Auto services.\");const emailSubject=encodeURIComponent(\"Inquiry about Farlet Auto services\");const emailBody=encodeURIComponent(\"Hello,\\n\\nI would like to inquire about Farlet Auto services.\\n\\nThank you!\");const socialLinks=[{name:\"WhatsApp\",url:`https://wa.me/${whatsappPhone}?text=${whatsappMessage}`,icon:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",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\",fill:iconColor})})},{name:\"Instagram\",url:instagramUrl,icon:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z\",fill:iconColor})})},{name:\"Facebook\",url:facebookUrl,icon:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z\",fill:iconColor})})},{name:\"Email\",url:`mailto:${email}?subject=${emailSubject}&body=${emailBody}`,icon:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z\",fill:iconColor})})}];return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"flex-start\",zIndex:999999},onClick:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onMouseDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onMouseUp:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onPointerDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"flex\",flexDirection:\"column-reverse\",gap:12,alignItems:iconAlignment===\"left\"?\"flex-start\":iconAlignment===\"right\"?\"flex-end\":\"center\",width:\"max-content\",zIndex:999999,pointerEvents:\"auto\"},onClick:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onMouseDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onPointerDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},children:[/*#__PURE__*/_jsx(motion.button,{onClick:e=>{e.stopPropagation();e.preventDefault();e.nativeEvent.stopImmediatePropagation();toggleModal();},onMouseDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onPointerDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},style:{backgroundColor:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:50,padding:`${buttonPadding}px ${buttonPadding*2}px`,cursor:\"pointer\",...buttonFont,boxShadow:\"0 4px 20px rgba(0, 0, 0, 0.15)\",position:\"relative\",zIndex:999999,pointerEvents:\"auto\"},whileHover:{scale:1.05,boxShadow:\"0 6px 25px rgba(0, 0, 0, 0.2)\"},whileTap:{scale:.95},transition:{type:\"spring\",stiffness:400,damping:17},children:buttonText}),/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.2},style:{position:\"relative\",zIndex:1e6,display:\"flex\",gap:12,width:\"max-content\",pointerEvents:\"auto\"},children:socialLinks.map((social,index)=>/*#__PURE__*/_jsx(motion.a,{href:social.url,target:\"_blank\",rel:\"noopener noreferrer\",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{delay:index*.05,type:\"spring\",stiffness:400,damping:20},whileHover:{scale:1.15,y:-5,boxShadow:\"0 8px 20px rgba(0, 0, 0, 0.25)\"},whileTap:{scale:.9},style:{width:48,height:48,borderRadius:\"50%\",backgroundColor:iconBackgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",textDecoration:\"none\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.2)\",pointerEvents:\"auto\",zIndex:1000001},onClick:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},onMouseDown:e=>{e.stopPropagation();e.nativeEvent.stopImmediatePropagation();},children:social.icon},social.name))})})})]})});}addPropertyControls(SocialModalButton,{iconAlignment:{type:ControlType.Enum,title:\"Icon Align\",options:[\"center\",\"left\",\"right\"],optionTitles:[\"Centered\",\"Left\",\"Right\"],defaultValue:\"center\",displaySegmentedControl:true},buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Message me\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"18px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},buttonPadding:{type:ControlType.Number,title:\"Button Padding\",defaultValue:16,min:8,max:40,step:2,unit:\"px\"},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#2D9B8E\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text Color\",defaultValue:\"#FFFFFF\"},iconBackgroundColor:{type:ControlType.Color,title:\"Icon Background\",defaultValue:\"#F5F5F5\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000000\"},instagramUrl:{type:ControlType.String,title:\"Instagram URL\",defaultValue:\"https://instagram.com/yourprofile\"},facebookUrl:{type:ControlType.String,title:\"Facebook URL\",defaultValue:\"https://facebook.com/yourpage\"},whatsappPhone:{type:ControlType.String,title:\"WhatsApp Phone\",defaultValue:\"1234567890\",description:\"Phone number with country code (no + or spaces)\"},email:{type:ControlType.String,title:\"Email Address\",defaultValue:\"info@farletauto.com\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SocialModalButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"280\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicHeight\":\"70\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SocialModalButton.map"],"mappings":"uPAUG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,aAAW,cAAY,kBAAgB,YAAU,sBAAoB,gBAAc,eAAa,cAAY,gBAAc,QAAM,aAAW,iBAAe,EAAW,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAO,MAAgB,CAAC,MAAoB,EAAU,CAAC,EAAO,CAAC,EAA8S,EAAY,CAAC,CAAC,KAAK,WAAW,IAAI,iBAAiB,EAAc,oFAA0B,KAAkB,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,SAAsB,EAAK,OAAO,CAAC,EAAE,mlCAAmlC,KAAK,EAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,IAAI,EAAa,KAAkB,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA6B,SAAsB,EAAK,OAAO,CAAC,EAAE,ijCAAijC,KAAK,EAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,WAAW,IA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