{"version":3,"file":"AddIDForElement.X-RwZm9V.mjs","names":["setVariant","useState"],"sources":["https:/framerusercontent.com/modules/cueeGIDT2CyaCVWAsjlt/iCZu0mKajB1JMvh00vv0/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});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\":{\"setVariant\":{\"type\":\"reactHoc\",\"name\":\"setVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"priceId\":{\"type\":\"reactHoc\",\"name\":\"priceId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"totalId\":{\"type\":\"reactHoc\",\"name\":\"totalId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addCC\":{\"type\":\"reactHoc\",\"name\":\"addCC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addProductivity\":{\"type\":\"reactHoc\",\"name\":\"addProductivity\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"cartPurchaseButtonId\":{\"type\":\"reactHoc\",\"name\":\"cartPurchaseButtonId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"newPurchaseButton\":{\"type\":\"reactHoc\",\"name\":\"newPurchaseButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantAC_mob\":{\"type\":\"reactHoc\",\"name\":\"setVariantAC_mob\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantAC_Desktop\":{\"type\":\"reactHoc\",\"name\":\"setVariantAC_Desktop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"goBack\":{\"type\":\"reactHoc\",\"name\":\"goBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addMoney\":{\"type\":\"reactHoc\",\"name\":\"addMoney\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addGrowth\":{\"type\":\"reactHoc\",\"name\":\"addGrowth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}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