{"version":3,"file":"Examples.B-rQGTYb.mjs","names":[],"sources":["https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/HPYh5RL3Ld2HNmV491O8/esEza7u5ACUipaGcwADj/Examples.js"],"sourcesContent":["export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}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/docs/guides/overrides/\nconst useStore=createStore({background:\"#0099FF\",currentSection:\"\"});export function withRotate(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,animate:{rotate:90},transition:{duration:2}});};}export function withHover(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,whileHover:{scale:1.05}});};}export function withRandomColor(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});};}// How to add an attribute to an element\nexport function withDataHook(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,\"data-test\":\"anton\"});};}export function withFireClickEvent(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{window.dataLayer.push({event:\"button-click\"});}});};}export function withFireDemoVisibilityEvent(Component){return props=>{useEffect(()=>{console.log(\"run\");const observer=new MutationObserver((mutationsList,observer)=>{// Check for the presence of \"thank you\" in any text node in the document\nif(document.body.innerText.toLowerCase().includes(\"A member of the team will be in touch shortly\")){console.log(\"fired\");// Ensure the event is fired only once when \"thank you\" becomes visible\nwindow.dataLayer.push({event:\"form-visible\"});}else{console.log(\"not fired\");}});// Configuration of the observer:\n// - childList: to observe direct children\n// - subtree: to observe all descendants\n// - characterData: to observe text changes\nconst config={childList:true,subtree:true,characterData:true};// Start observing the body for changes\nobserver.observe(document.body,config);// Clean up the observer on component unmount\nreturn()=>{observer.disconnect();};},[])// Empty dependency array ensures this effect runs only once after initial render\n;// Render the original component\nreturn /*#__PURE__*/_jsx(Component,{...props});};}export function withFireDemoClickEvent(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{window.dataLayer.push({event:\"button-demo-click\"});}});};}export function withFireHoverEvent(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onMouseEnter:()=>{window.dataLayer.push({event:\"element-hover\"});}});};}export function withConsoleLog(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{console.log(\"Hello from the code!\");}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFireDemoClickEvent\":{\"type\":\"reactHoc\",\"name\":\"withFireDemoClickEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFireClickEvent\":{\"type\":\"reactHoc\",\"name\":\"withFireClickEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDataHook\":{\"type\":\"reactHoc\",\"name\":\"withDataHook\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFireHoverEvent\":{\"type\":\"reactHoc\",\"name\":\"withFireHoverEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withConsoleLog\":{\"type\":\"reactHoc\",\"name\":\"withConsoleLog\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFireDemoVisibilityEvent\":{\"type\":\"reactHoc\",\"name\":\"withFireDemoVisibilityEvent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"8RAAa,EAAgB,CACzB,QAAS,OACT,eAAgB,SAChB,WAAY,SACf,CAWG,CADA,GAAG,EACO,ICHoC,SAAgB,EAAuB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,YAAY,CAAC,EAAO,UAAU,KAAK,CAAC,MAAM,oBAAoB,CAAC,EAAG,CAAC,sBAZxL,IAA6B,IAAqE,IAAqE,CACnM,EAAY,CAAC,WAAW,UAAU,eAAe,GAAG,CAAC"}