{"version":3,"file":"CaseStudyFallback.C6Te5pPT.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/QHByQ35iLhwgUBhngIPf/GU32FB9xT2E940jN0QBs/CaseStudyFallback.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useLayoutEffect,useCallback,useRef}from\"react\";// User request: Create a Framer code override named withCaseStudyFallback that checks the primary CMS list (child 0) and toggles visibility between primary/fallback lists (child 1) using useLayoutEffect with zero visual flash.\nexport function withCaseStudyFallback(Component){return /*#__PURE__*/forwardRef(function CaseStudyFallbackOverride(props,ref){const containerRef=useRef(null);const setContainerRef=useCallback(node=>{containerRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useLayoutEffect(()=>{if(typeof window===\"undefined\")return;const container=containerRef.current;if(!container)return;const primary=container.children[0];const fallback=container.children[1];if(!primary||!fallback)return;const hasPrimaryItems=primary.children.length>0;if(hasPrimaryItems){primary.style.display=\"\";fallback.style.display=\"none\";}else{primary.style.display=\"none\";fallback.style.display=\"\";}});return /*#__PURE__*/_jsx(Component,{...props,ref:setContainerRef});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCaseStudyFallback\":{\"type\":\"reactHoc\",\"name\":\"withCaseStudyFallback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CaseStudyFallback.map"],"mappings":"qJACA,SAAgB,EAAsB,EAAU,CAAC,OAAoB,EAAW,SAAmC,EAAM,EAAI,CAAC,IAAM,EAAaA,EAAO,IAAI,EAAQ,EAAgBC,EAAY,GAAM,CAAC,EAAa,QAAQ,EAAQ,OAAO,GAAM,WAAY,EAAI,CAAI,EAAW,IAAK,EAAI,QAAQ,EAAM,EAAE,CAAC,CAAG,CAAC,EAA0Z,OAAxZ,MAAoB,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAU,EAAa,QAAQ,GAAG,CAAC,EAAU,OAAO,IAAM,EAAQ,EAAU,SAAS,GAAS,EAAS,EAAU,SAAS,GAAM,CAAC,GAAS,CAAC,IAAsC,EAAQ,SAAS,OAAO,GAAsB,EAAQ,MAAM,QAAQ,GAAG,EAAS,MAAM,QAAQ,SAAa,EAAQ,MAAM,QAAQ,OAAO,EAAS,MAAM,QAAQ,IAAI,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,CAAe,CAAC,CAAE,CAAC,CAAE,qBADpuB,IAAiE"}