{"version":3,"file":"Benefits_Section.BAIi6dkj.mjs","names":["__esmMin","init_npm_react_18_3_1","J","init_jsx_runtime","ce","createStore","init_store_js__1_0","withOnSelectItem","store","useStore","currentSelectedItem","\"selectedItemReference\"","handleOnSelectItem","props","\"handleOnSelectItem\"","\"referencedSectionItem\"","Component","withSetSelectedItem","setStore","selected","handleSetSelectedItem","selectedItemReference","init_Benefits_Section"],"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":"A,iLAA+M,SAAgBO,EAAiB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAACC,GAAOC,EAAS,EAAQC,EAAoBF,EAAMG,sBAA+BC,MAAuB,CAACC,EAAMC,qBAAwBD,EAAME,qBAAwB,CAAE,EACjZ,OAApEX,MAAc,CAAKM,GAAqBE,EAAmB,CAAG,EAAE,CAAC,CAAC,EAAsB,gBAAKI,EAAU,CAAK,MAAI,GAAGH,EAAyB,oBAAkB,CAAC,CAAE,CAAC,CAAE,CAIjK,SAAgBI,EAAoB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAACT,EAAMU,GAAUT,EAAS,EAAMU,EAASX,EAAMG,sBAA+BS,EAAsB,GAAuB,CAACF,EAAS,CAAC,GAAGV,EAAM,uBAAqB,CAAC,EAAE,EAASa,CAAsB,EAAE,MAAoB,gBAAKL,EAAU,CAAK,MAAI,GAAGH,EAAM,sBAAsBM,EAA+B,uBAAqB,CAAC,CAAE,CAAC,CAAE,C,gDALnR,EAASd,EAAY,CAAC,sBAAsB,EAAE,CAAC,C"}