{"version":3,"file":"CheckoutTracking.DEFkfjgO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/xLq8FW7RFFzfbXS9NE7c/2u3x4iRa0yY7iBBg0tNr/CheckoutTracking.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}// ============================================\n// CONFIGURATION - EDIT THESE VALUES\n// ============================================\nconst MAIN_PRODUCT={id:\"sb\",name:\"Success Blueprint\",price:19.99,currency:\"USD\"};const MID_PRODUCT={id:\"mysi\",name:\"Make Your Success Inevitable\",price:3.99,currency:\"USD\"};// ============================================\n// TRACKING FUNCTIONS\n// ============================================\nfunction trackBeginCheckout(product){// Ensure dataLayer exists\nwindow.dataLayer=window.dataLayer||[];// Clear previous ecommerce data\nwindow.dataLayer.push({ecommerce:null});// Push begin_checkout event\nwindow.dataLayer.push({event:\"begin_checkout\",ecommerce:{currency:product.currency,value:product.price,items:[{item_id:product.id,item_name:product.name,price:product.price,quantity:1}]}});console.log(\"✅ Checkout tracked:\",product.name,\"$\"+product.price);}// ============================================\n// CODE OVERRIDES - Apply these to your buttons\n// ============================================\n// Override for MAIN PRODUCT checkout button\nexport function withMainProductCheckout(Component){return props=>{const handleClick=e=>{trackBeginCheckout(MAIN_PRODUCT);// If there's an existing onClick, call it too\nif(props.onClick){props.onClick(e);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}// Override for MID-LEVEL PRODUCT checkout button\nexport function withMidProductCheckout(Component){return props=>{const handleClick=e=>{trackBeginCheckout(MID_PRODUCT);// If there's an existing onClick, call it too\nif(props.onClick){props.onClick(e);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withMidProductCheckout\":{\"type\":\"reactHoc\",\"name\":\"withMidProductCheckout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMainProductCheckout\":{\"type\":\"reactHoc\",\"name\":\"withMainProductCheckout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckoutTracking.map"],"mappings":"wLAOA,SAAS,EAAmB,EAAQ,CACpC,EAAO,UAAU,EAAO,WAAW,EAAE,CACrC,EAAO,UAAU,KAAK,CAAC,UAAU,KAAK,CAAC,CACvC,EAAO,UAAU,KAAK,CAAC,MAAM,iBAAiB,UAAU,CAAC,SAAS,EAAQ,SAAS,MAAM,EAAQ,MAAM,MAAM,CAAC,CAAC,QAAQ,EAAQ,GAAG,UAAU,EAAQ,KAAK,MAAM,EAAQ,MAAM,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,sBAAsB,EAAQ,KAAK,IAAI,EAAQ,MAAM,CAI9P,SAAgB,EAAwB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAY,GAAG,CAAC,EAAmB,EAAa,CACrH,EAAM,SAAS,EAAM,QAAQ,EAAE,EAAI,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,CAAC,yBAf7D,IAA8B,IAAqE,IAAqE,CACpM,EAAY,CAAC,WAAW,UAAU,CAAC,CAG5C,EAAa,CAAC,GAAG,KAAK,KAAK,oBAAoB,MAAM,MAAM,SAAS,MAAM"}