{"version":3,"file":"Benefits_Section.B68PIOGO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/rtbEX3vR1d6OpKZ1GXFG/69KJymonHOzWwYC0g7xb/Benefits_Section.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({selectedItemReference:\"\"});export function withOnSelectItem(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store]=useStore();const currentSelectedItem=store[\"selectedItemReference\"];const handleOnSelectItem=()=>{props[\"handleOnSelectItem\"]?.(props[\"referencedSectionItem\"]);};// Run after mount, not during render\nuseEffect(()=>{if(!currentSelectedItem){handleOnSelectItem();}},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,handleOnSelectItem:handleOnSelectItem});});}/**\n * This function creates an override for the \"handleSetSelectedItem\" event.\n * This event will be called from the function `withOnSelectItem` and will\n * update the current selected item.\n */export function withSetSelectedItem(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();let selected=store[\"selectedItemReference\"];const handleSetSelectedItem=selectedItemReference=>{setStore({...store,selectedItemReference});selected=selectedItemReference;};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,selectedItemReference:selected,handleSetSelectedItem:handleSetSelectedItem});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSetSelectedItem\":{\"type\":\"reactHoc\",\"name\":\"withSetSelectedItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOnSelectItem\":{\"type\":\"reactHoc\",\"name\":\"withOnSelectItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Benefits_Section.map"],"mappings":"yNAA+M,SAAgB,EAAiB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,GAAO,EAAS,EAAQ,EAAoB,EAAM,sBAA+B,MAAuB,CAAC,EAAM,qBAAwB,EAAM,qBAAwB,CAAE,EACjZ,OAApE,MAAc,CAAK,GAAqB,EAAmB,CAAG,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAyB,oBAAkB,CAAC,CAAE,CAAC,CAAE,CAIjK,SAAgB,EAAoB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAM,GAAU,EAAS,EAAM,EAAS,EAAM,sBAA+B,EAAsB,GAAuB,CAAC,EAAS,CAAC,GAAG,EAAM,uBAAqB,CAAC,EAAE,EAAS,CAAsB,EAAE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,sBAAsB,EAA+B,uBAAqB,CAAC,CAAE,CAAC,CAAE,mBALvY,IAAwC,IAAqE,EAAO,EAAS,EAAY,CAAC,sBAAsB,EAAE,CAAC"}