{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/7VekRYsnccvY3tuFFqOA/RSlqOlwKcUtYwOiMSaO2/Register_Button.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{Helmet}from\"react-helmet\";export default function Download(props){const{title,tint,style,file}=props;const[isHovered,setIsHovered]=useState(false);const handleHover=()=>{setIsHovered(true);};const handleHoverEnd=()=>{setIsHovered(false);};const buttonStyle={margin:0,borderRadius:10,backgroundColor:tint,color:\"#FFFFFF\",fontSize:\"16px\",fontFamily:\"Public Sans, serif\",cursor:isHovered?\"pointer\":\"default\",transform:isHovered?\"scale(1.01)\":\"scale(1)\",transition:\"transform 0.3s\"};async function postData(){try{const response=await fetch(\"https://onboarding.streakcard.click/nfo/log-event\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({studentUserID:\"NA\",eventName:\"individual_registration_website_click\",productIDs:[100]})});if(!response.status){throw new Error(\"Something went wrong\");}const result=await response.json();console.log(result);return result// Return the result if needed for further use\n;}catch(error){console.error(\"Error:\",error.message);}}return /*#__PURE__*/_jsxs(motion.div,{style:{...style,...containerStyle},children:[/*#__PURE__*/_jsx(Helmet,{children:/*#__PURE__*/_jsx(\"link\",{href:\"https://fonts.googleapis.com/css2?family=Pridi:wght@500&display=swap\",rel:\"stylesheet\"})}),/*#__PURE__*/_jsx(motion.div,{onTap:()=>{const urlParams=new URLSearchParams(window.location.search);const referrer=document.referrer;const referredBy=urlParams.get(\"referredBy\");const fbclid=urlParams.get(\"fbclid\");const utm_medium=urlParams.get(\"utm_medium\");const utm_campaign=urlParams.get(\"utm_campaign\");const utm_content=urlParams.get(\"utm_content\");const utm_source=urlParams.get(\"utm_source\");const baseUrl=\"https://nfoself.checkout.nationalfinanceolympiad.com/CheckoutPage/?&scl=SLF\";// Function to build the URL with available parameters\nfunction buildUrl(){const params=new URLSearchParams;// Add base parameters\n// Conditionally add optional parameters if they are available\nif(referredBy)params.append(\"referredBy\",referredBy);if(fbclid)params.append(\"fbclid\",fbclid);if(utm_source)params.append(\"utm_source\",utm_source);if(utm_medium)params.append(\"utm_medium\",utm_medium);if(utm_campaign)params.append(\"utm_campaign\",utm_campaign);if(utm_content)params.append(\"utm_content\",utm_content);if(referrer)params.append(\"referrer\",referrer);return`${baseUrl}&${params.toString()}`;}postData().then(()=>{// if (fbclid) {\n//     window.open(buildUrl(), \"_self\")\n// } else {\n//     window.open(\n//         \"https://nfoself.checkout.nationalfinanceolympiad.com/CheckoutPage/?&scl=SLF\",\n//         \"_self\"\n//     )\n// }\nwindow.open(buildUrl(),\"_self\");}).catch(()=>{// if (referredBy) {\n//     window.open(buildUrl(), \"_self\")\n// } else {\n//     window.open(\n//         \"https://nfoself.checkout.nationalfinanceolympiad.com/CheckoutPage/?&scl=SLF\",\n//         \"_self\"\n//     )\n// }\nwindow.open(buildUrl(),\"_self\");});},style:{paddingLeft:50,...buttonStyle,paddingRight:50,paddingTop:15,paddingBottom:15,fontWeight:700},onMouseEnter:handleHover,onMouseLeave:handleHoverEnd,children:title})]});}Download.defaultProps={tint:\"#09F\",title:\"Register for NFO 2024\"};addPropertyControls(Download,{tint:{title:\"Tint\",type:ControlType.Color},title:{title:\"Label\",type:ControlType.String},file:{title:\"File\",type:ControlType.File,allowedFileTypes:[]}});const containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Download\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Register_Button.map"],
  "mappings": "gMAA2N,SAARA,EAA0BC,EAAM,CAAC,GAAK,CAAC,MAAAC,EAAM,KAAAC,EAAK,MAAAC,EAAM,KAAAC,CAAI,EAAEJ,EAAW,CAAC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U,CAAC,IAAMC,EAAO,IAAI,gBAErC,OAAGR,GAAWQ,EAAO,OAAO,aAAaR,CAAU,EAAKC,GAAOO,EAAO,OAAO,SAASP,CAAM,EAAKI,GAAWG,EAAO,OAAO,aAAaH,CAAU,EAAKH,GAAWM,EAAO,OAAO,aAAaN,CAAU,EAAKC,GAAaK,EAAO,OAAO,eAAeL,CAAY,EAAKC,GAAYI,EAAO,OAAO,cAAcJ,CAAW,EAAKL,GAASS,EAAO,OAAO,WAAWT,CAAQ,EAAQ,GAAGO,CAAO,IAAIE,EAAO,SAAS,CAAC,EAAG,CAACpB,EAAS,EAAE,KAAK,IAAI,CAQvaU,EAAO,KAAKS,EAAS,EAAE,OAAO,CAAE,CAAC,EAAE,MAAM,IAAI,CAQ7CT,EAAO,KAAKS,EAAS,EAAE,OAAO,CAAE,CAAC,CAAE,EAAE,MAAM,CAAC,YAAY,GAAG,GAAGpB,EAAY,aAAa,GAAG,WAAW,GAAG,cAAc,GAAG,WAAW,GAAG,EAAE,aAAaF,EAAY,aAAaC,EAAe,SAASR,CAAK,CAAC,CAAC,CAAC,CAAC,CAAE,CAACF,EAAS,aAAa,CAAC,KAAK,OAAO,MAAM,uBAAuB,EAAEiC,EAAoBjC,EAAS,CAAC,KAAK,CAAC,MAAM,OAAO,KAAKkC,EAAY,KAAK,EAAE,MAAM,CAAC,MAAM,QAAQ,KAAKA,EAAY,MAAM,EAAE,KAAK,CAAC,MAAM,OAAO,KAAKA,EAAY,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,IAAMhB,EAAe,CAAC,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,SAAS,QAAQ",
  "names": ["Download", "props", "title", "tint", "style", "file", "isHovered", "setIsHovered", "ye", "handleHover", "handleHoverEnd", "buttonStyle", "postData", "response", "result", "error", "u", "motion", "containerStyle", "p", "ae", "urlParams", "window", "referrer", "referredBy", "fbclid", "utm_medium", "utm_campaign", "utm_content", "utm_source", "baseUrl", "buildUrl", "params", "addPropertyControls", "ControlType"]
}
