{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/aa1cZa2MZXX2a40yMbuN/gujDVCrBHCWkRtkAQheu/FBQ_Event_At_Btn_click.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";const Btn=({text,customStyle,redirectSection,showWhatsAppIcon,redirectlInk})=>{const[clicked,setClicked]=useState(false);const[isMobile,setIsMobile]=useState(false);useEffect(()=>{if(typeof window!==\"undefined\"){setIsMobile(window.innerWidth<=768);const handleResize=()=>{setIsMobile(window.innerWidth<=768);};window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);}},[]);if(typeof window!==\"undefined\"){const pathname=window.location.pathname;if(pathname.includes(\"talk-to-our-expert\")){text=\"Talk to our expert\";customStyle={borderRadius:0,display:\"flex\",justifyContent:\"center\",alignItems:\"center\"};showWhatsAppIcon=true;}if([\"new\",\"swimming-kids-new\",\"swimming-adults-new\"].some(path=>pathname.includes(path))){text=\"Register to hold offer\";}if([\"clubs\"].some(path=>pathname.includes(path))){text=\"Join For Free\";showWhatsAppIcon=true;}}const BookTrialText=text?text:\"Limited offer - BUY NOW!\";const handleOnClick=async()=>{if(typeof window===\"undefined\")return;let eventValue=text||\"Sticky-CTA-Button-Click\";if(showWhatsAppIcon){eventValue=`WhatsApp_Click_${eventValue}`;}const{pathname,search}=window.location;// Extract fbclid and gclid manually using RegExp\nconst fbclidMatch=search.match(/[?&]fbclid=([^&]+)/);const gclidMatch=search.match(/[?&]gclid=([^&]+)/);const fbclid=fbclidMatch?fbclidMatch[1]:null;const gclid=gclidMatch?gclidMatch[1]:null;// Lookup object for mapping paths to redirect links\nconst whatsappLinks={\"/summer/football/kids/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20football%20coaching%20for%20my%20kid\",\"/summer/swimming/kids/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20swimming%20coaching%20for%20my%20kid\",\"/bau/swimming/kids/existing-talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20swimming%20coaching%20for%20my%20kid\",\"/summer/swimming/toddlers/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20toddler%20swimming%20classes\",\"/bau/swimming/toddlers/new-talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20toddler%20swimming%20classes\",\"/clubs/pickleball-a\":\"https://chat.whatsapp.com/K39aqy45yj0I4HceED3mpT?\",\"/clubs/pickleball-b\":\"https://chat.whatsapp.com/K39aqy45yj0I4HceED3mpT?\",\"/summer/basketball/kids/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B%20I%27m%20looking%20for%20basketball%20coaching%20for%20my%20kid\",\"/badminton/kids/existing/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B\",\"/summer/badminton/kids/talk-to-our-expert\":\"https://api.whatsapp.com/send?phone=918147142447&text=Hi%20%F0%9F%91%8B\"};let redirectLink=Object.keys(whatsappLinks).find(key=>pathname.includes(key))?whatsappLinks[Object.keys(whatsappLinks).find(key=>pathname.includes(key))]:null;if(redirectLink&&(fbclid||gclid)){const referralParams=[];if(fbclid)referralParams.push(`fbclid:${encodeURIComponent(fbclid)}`);if(gclid)referralParams.push(`gclid:${encodeURIComponent(gclid)}`);if(referralParams.length>0){redirectLink+=`%0A%0AHere is my referral code to avail the summer discount: ${referralParams.join(\"&\")}`;}}const webHookRequestBody={event:eventValue,url:pathname,fbclid,gclid,utm_campaign:\"test1\",utm_medium:\"test abc\",utm_source:\"test abc\",utm_content:\"test abc\",timestamp:new Date().toISOString()};const formData=new FormData;formData.append(\"event\",eventValue);formData.append(\"url\",pathname);formData.append(\"fbclid\",fbclid||\"\");formData.append(\"gclid\",gclid||\"\");formData.append(\"utm_campaign\",\"test1\");formData.append(\"utm_medium\",\"test abc\");formData.append(\"utm_source\",\"test abc\");formData.append(\"utm_content\",\"test abc\");formData.append(\"timestamp\",new Date().toISOString());// Replace spaces with underscores\neventValue=eventValue.replace(/\\s+/g,\"_\");// Open WhatsApp link or scroll to target section\nif(redirectLink){// Facebook tracking only for talk to expert\nif(typeof fbq===\"function\"){fbq(\"track\",\"Purchase\",{value:100,currency:\"INR\"},{eventID:\"purchase_talk_to_expert\"});}else{console.error(\"fbq is not defined.\");}window.open(redirectLink,\"_blank\");}else{const targetSection=document.getElementById(redirectSection||\"book-a-free-trial\");if(targetSection){targetSection.scrollIntoView({behavior:\"smooth\"});}}setClicked(true);setTimeout(()=>setClicked(false),2e3);};return /*#__PURE__*/_jsx(\"button\",{style:{...styles.btn,...customStyle||{},borderRadius:isMobile?0:\"50px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",cursor:\"pointer\",opacity:1,transition:\"all 0.3s ease\"},className:text,onClick:handleOnClick,tabIndex:0,children:showWhatsAppIcon?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"img\",{src:\"https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg\",width:21}),\"\\xa0\",text?text:\"Book A Free Trial\"]}):/*#__PURE__*/_jsxs(_Fragment,{children:[\" \",text?text:\"Book A Free Trial\"]})});};export function RedColorBtn(){return{children:/*#__PURE__*/_jsx(Btn,{customStyle:{backgroundColor:\"#E95A4F\",color:\"#fff\"}})};}export function GreenColorBtn(){return{children:/*#__PURE__*/_jsx(Btn,{customStyle:{backgroundColor:\"#00A69C\",color:\"#fff\"}})};}export function PurpleColorBtn(){return{children:/*#__PURE__*/_jsx(Btn,{customStyle:{backgroundColor:\"#8761C4\",color:\"#fff\"}})};}export function YellowColorBtn(){return{children:/*#__PURE__*/_jsx(Btn,{customStyle:{backgroundColor:\"#feee4e\",color:\"#000\"}})};}export function DownLoadBtn(){return{children:/*#__PURE__*/_jsx(Btn,{customStyle:{border:\"2px solid #FFF100\",borderRadius:\"100px\",backgroundColor:\"transparent\",height:\"46px\"},text:\"Download the App\"})};}const styles={btn:{width:\"100%\",height:\"51px\",cursor:\"pointer\",backgroundColor:\"#E95A4F\",color:\"#fff\",textAlign:\"center\",fontFamily:\"Urbanist\",fontSize:\"16px\",fontStyle:\"normal\",fontWeight:900,lineHeight:\"24px\",letterSpacing:\"0.5px\",border:\"none\"}};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withRedColorBtn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...RedColorBtn(props)});};}withRedColorBtn.displayName=\"RedColorBtn\";export function withGreenColorBtn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...GreenColorBtn(props)});};}withGreenColorBtn.displayName=\"GreenColorBtn\";export function withPurpleColorBtn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...PurpleColorBtn(props)});};}withPurpleColorBtn.displayName=\"PurpleColorBtn\";export function withYellowColorBtn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...YellowColorBtn(props)});};}withYellowColorBtn.displayName=\"YellowColorBtn\";export function withDownLoadBtn(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...DownLoadBtn(props)});};}withDownLoadBtn.displayName=\"DownLoadBtn\";\nexport const __FramerMetadata__ = {\"exports\":{\"GreenColorBtn\":{\"type\":\"override\",\"name\":\"GreenColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PurpleColorBtn\":{\"type\":\"override\",\"name\":\"PurpleColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RedColorBtn\":{\"type\":\"override\",\"name\":\"RedColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGreenColorBtn\":{\"type\":\"reactHoc\",\"name\":\"withGreenColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withYellowColorBtn\":{\"type\":\"reactHoc\",\"name\":\"withYellowColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedColorBtn\":{\"type\":\"reactHoc\",\"name\":\"withRedColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"DownLoadBtn\":{\"type\":\"override\",\"name\":\"DownLoadBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"YellowColorBtn\":{\"type\":\"override\",\"name\":\"YellowColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPurpleColorBtn\":{\"type\":\"reactHoc\",\"name\":\"withPurpleColorBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDownLoadBtn\":{\"type\":\"reactHoc\",\"name\":\"withDownLoadBtn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FBQ_Event_At_Btn_click.map"],
  "mappings": "yIAAAA,IAAqH,IAAMC,EAAI,CAAC,CAAC,KAAAC,EAAK,YAAAC,EAAY,gBAAAC,EAAgB,iBAAAC,EAAiB,aAAAC,CAAY,IAAI,CAAC,GAAK,CAACC,EAAQC,CAAU,EAAEC,EAAS,EAAK,EAAO,CAACC,EAASC,CAAW,EAAEF,EAAS,EAAK,EAAqQ,GAAnQG,EAAU,IAAI,CAAC,GAAG,OAAO,OAAS,IAAY,CAACD,EAAY,OAAO,YAAY,GAAG,EAAE,IAAME,EAAa,IAAI,CAACF,EAAY,OAAO,YAAY,GAAG,CAAE,EAAE,cAAO,iBAAiB,SAASE,CAAY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C,EAA4J,SAASQ,EAAgBC,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASb,EAAKU,EAAE,CAAC,GAAGC,EAAM,GAAGP,EAAYO,CAAK,CAAC,CAAC,EAAI,CAACF,EAAgB,YAAY,cAAqB,SAASK,EAAkBJ,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASb,EAAKU,EAAE,CAAC,GAAGC,EAAM,GAAGN,EAAcM,CAAK,CAAC,CAAC,EAAI,CAACG,EAAkB,YAAY,gBAAuB,SAASC,EAAmBL,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASb,EAAKU,EAAE,CAAC,GAAGC,EAAM,GAAGL,EAAeK,CAAK,CAAC,CAAC,EAAI,CAACI,EAAmB,YAAY,iBAAwB,SAASC,EAAmBN,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASb,EAAKU,EAAE,CAAC,GAAGC,EAAM,GAAGJ,EAAeI,CAAK,CAAC,CAAC,EAAI,CAACK,EAAmB,YAAY,iBAAwB,SAASC,EAAgBP,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASb,EAAKU,EAAE,CAAC,GAAGC,EAAM,GAAGH,EAAYG,CAAK,CAAC,CAAC,EAAI,CAACM,EAAgB,YAAY",
  "names": ["init_ssg_sandbox_shims", "Btn", "text", "customStyle", "redirectSection", "showWhatsAppIcon", "redirectlInk", "clicked", "setClicked", "ye", "isMobile", "setIsMobile", "ue", "handleResize", "pathname", "path", "BookTrialText", "handleOnClick", "eventValue", "search", "fbclidMatch", "gclidMatch", "fbclid", "gclid", "whatsappLinks", "redirectLink", "key", "referralParams", "webHookRequestBody", "formData", "targetSection", "p", "styles", "u", "l", "RedColorBtn", "GreenColorBtn", "PurpleColorBtn", "YellowColorBtn", "DownLoadBtn", "withRedColorBtn", "C", "props", "re", "DataObserverContext", "withGreenColorBtn", "withPurpleColorBtn", "withYellowColorBtn", "withDownLoadBtn"]
}
