{"version":3,"file":"Button_Datalayer.O2FWKbB9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/rjNgO2lrUDZxTKCFA2Yf/Db8kCbmARY2eEtTLaJPh/Button_Datalayer.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function withClickEvent(Component,eventName=\"event_name\",targetId=\"contact-form\"// ID of the section to scroll to\n){return function WrappedComponent(props){const handleClick=event=>{event.preventDefault()// Prevent default link behavior\n;if(window.dataLayer){window.dataLayer.push({event:eventName});}else{console.warn(\"dataLayer is not defined\");}// Smooth scroll to target section\nconst targetElement=document.getElementById(targetId);if(targetElement){targetElement.scrollIntoView({behavior:\"smooth\",block:\"start\"});}else{console.warn(`Element with ID \"${targetId}\" not found.`);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick,style:{cursor:\"pointer\"}});};}export function withSmoothScrollEvent(Component,eventName=\"event_name\",homepageUrl=\"/#contact-form\"){return function WrappedComponent(props){const handleClick=()=>{if(window.dataLayer){window.dataLayer.push({event:eventName});}else{console.warn(\"dataLayer is not defined\");}window.location.href=homepageUrl// Redirect to homepage\n;};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick,style:{cursor:\"pointer\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSmoothScrollEvent\":{\"type\":\"reactHoc\",\"name\":\"withSmoothScrollEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withClickEvent\":{\"type\":\"reactHoc\",\"name\":\"withClickEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button_Datalayer.map"],"mappings":"kHAA2C,SAAgB,EAAe,EAAU,EAAU,aAAa,EAAS,eACnH,CAAC,OAAO,SAA0B,EAAM,CAAC,IAAM,EAAY,GAAO,CAAC,EAAM,gBAAgB,CACtF,EAAO,UAAW,EAAO,UAAU,KAAK,CAAC,MAAM,EAAU,CAAC,CAAO,QAAQ,KAAK,2BAA2B,CAC7G,IAAM,EAAc,SAAS,eAAe,EAAS,CAAI,EAAe,EAAc,eAAe,CAAC,SAAS,SAAS,MAAM,QAAQ,CAAC,CAAO,QAAQ,KAAK,oBAAoB,EAAS,cAAc,EAAI,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC,EAAI,SAAgB,EAAsB,EAAU,EAAU,aAAa,EAAY,iBAAiB,CAAC,OAAO,SAA0B,EAAM,CAAC,IAAM,MAAgB,CAAI,EAAO,UAAW,EAAO,UAAU,KAAK,CAAC,MAAM,EAAU,CAAC,CAAO,QAAQ,KAAK,2BAA2B,CAAE,EAAO,SAAS,KAAK,GAC7kB,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC,uBAJnD"}