{"version":3,"file":"AddIDForElement.Cg-O2dtX.mjs","names":["setVariant","useState"],"sources":["https:/framerusercontent.com/modules/cueeGIDT2CyaCVWAsjlt/9ZiLIPXsa3aFAzP3LAKd/AddIDForElement.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,forwardRef}from\"react\";export function newPurchaseButton(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=e=>{e.preventDefault();if(window.isProcessing){console.log(\"Payment already in progress, please wait...\");return;}const userForm=document.getElementById(\"detailsform\");console.log(\"Calling form submit handler\");userForm.requestSubmit();};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}export function addCC(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,id:\"contentcreation\"});};}export function addProductivity(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,id:\"productivity\"});};}export function addGrowth(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,id:\"growth\"});};}export function addMoney(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,id:\"money\"});};}export function setVariant(Component){return props=>{const[variant,setVariant]=useState(null);useEffect(()=>{if(window.location.href.toString().split(\"#\")[1]===\"contentcreation\"){setVariant(\"Content Creation\");}else if(window.location.href.toString().split(\"#\")[1]===\"productivity\"){setVariant(\"Productivity\");}else if(window.location.href.toString().split(\"#\")[1]===\"money\"){setVariant(\"Money\");}else if(window.location.href.toString().split(\"#\")[1]===\"growth\"){setVariant(\"Growth\");}},[]);if(variant){return /*#__PURE__*/_jsx(Component,{...props,variant:variant});}return /*#__PURE__*/_jsx(Component,{...props});};}export function setVariantAC_Desktop(Component){return props=>{const[variant,setVariant]=useState(null);useEffect(()=>{if(window.location.href.toString().split(\"#\")[1]===\"contentcreation\"){setVariant(\"CONTENT CREATION\");}else if(window.location.href.toString().split(\"#\")[1]===\"productivity\"){setVariant(\"Desk-Productivity\");}else if(window.location.href.toString().split(\"#\")[1]===\"money\"){setVariant(\"Desk-Passive-Income\");}else if(window.location.href.toString().split(\"#\")[1]===\"growth\"){setVariant(\"Desk-Personal-growth\");}},[]);if(variant){return /*#__PURE__*/_jsx(Component,{...props,variant:variant,id:\"test\"});}return /*#__PURE__*/_jsx(Component,{...props,id:\"test\"});};}export function setVariantAC_mob(Component){return props=>{const[variant,setVariant]=useState(null);useEffect(()=>{if(window.location.href.toString().split(\"#\")[1]===\"contentcreation\"){setVariant(\"Content Creation\");}else if(window.location.href.toString().split(\"#\")[1]===\"productivity\"){setVariant(\"Mob-Productivity\");}else if(window.location.href.toString().split(\"#\")[1]===\"money\"){setVariant(\"Mobile Passive Income\");}else if(window.location.href.toString().split(\"#\")[1]===\"growth\"){setVariant(\"Mob-Personal Growth\");}},[]);if(variant){return /*#__PURE__*/_jsx(Component,{...props,variant:variant});}return /*#__PURE__*/_jsx(Component,{...props});};}export function goBack(Component){return props=>{function handleClick(){window.history.back();}return /*#__PURE__*/_jsx(Component,{...props,onTap:handleClick});};}export function cartPurchaseButtonId(Component){return props=>{const[course,setCourse]=useState(\"\");const[price,setPrice]=useState(0);useEffect(()=>{const price1=document.getElementById(\"testing123\")?.firstElementChild?.textContent||\"000\";let priceNumber=parseInt(price1.replace(/[^\\d]/g,\"\"));console.log(price1,priceNumber);const course1=document.getElementById(\"cartItem\")?.firstElementChild?.getAttribute(\"data-framer-name\")||\"ERROR_ERROR\";setCourse(course1);setPrice(priceNumber);console.log(\"test\",price1,course1);},[]);const handleClick=()=>{const currentUrl=new URL(window.location.href);const currentUrl2=new URL(window.location.href);currentUrl2.searchParams.set(\"course\",course);console.log(course);window.webengage.track(\"Purchase Clicked\",{Title:course.split(\"_\")[0],Purchase_Link:currentUrl2.toString(),Plan_Name:course.split(\"_\")[1],Plan_Cost:price,Price_String:price.toString()});const searchParams=new URLSearchParams(currentUrl.search);searchParams.set(\"basicDetails\",\"true\");const newUrl=`${window.location.pathname}?${searchParams.toString()}`;window.history.pushState({path:newUrl},\"\",newUrl);};return /*#__PURE__*/_jsx(Component,{...props,id:\"purchase-button-cart\",className:\"purchase-button\",style:{cursor:\"pointer\"},onClick:handleClick});};}export function priceId(Component){return props=>{const combinedClassName=`${props.className||\"\"} purchase-money-cart`.trim();props.id=\"testing123\";return /*#__PURE__*/_jsx(Component,{...props,className:combinedClassName});};}export function totalId(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,id:\"purchase-total-cart\"});};}\nexport const __FramerMetadata__ = {\"exports\":{\"cartPurchaseButtonId\":{\"type\":\"reactHoc\",\"name\":\"cartPurchaseButtonId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantAC_mob\":{\"type\":\"reactHoc\",\"name\":\"setVariantAC_mob\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"goBack\":{\"type\":\"reactHoc\",\"name\":\"goBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariant\":{\"type\":\"reactHoc\",\"name\":\"setVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addGrowth\":{\"type\":\"reactHoc\",\"name\":\"addGrowth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addCC\":{\"type\":\"reactHoc\",\"name\":\"addCC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"totalId\":{\"type\":\"reactHoc\",\"name\":\"totalId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"priceId\":{\"type\":\"reactHoc\",\"name\":\"priceId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantAC_Desktop\":{\"type\":\"reactHoc\",\"name\":\"setVariantAC_Desktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"newPurchaseButton\":{\"type\":\"reactHoc\",\"name\":\"newPurchaseButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addProductivity\":{\"type\":\"reactHoc\",\"name\":\"addProductivity\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addMoney\":{\"type\":\"reactHoc\",\"name\":\"addMoney\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":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