{"version":3,"file":"TestOver.O71j4SVE.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/qsUD5DRs4toq9ErUOgyy/W9IdLOykn9siOJUyunsa/TestOver.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";export function withThreeColumnGrid(Component){return /*#__PURE__*/forwardRef((props,ref)=>{// State for tracking which project page we're on and for storing images\nconst[currentSlug,setCurrentSlug]=useState(null);const[images,setImages]=useState([]);// Find images on the page and determine which project we're on\nuseEffect(()=>{// Extract the current slug from the pathname\nconst currentPath=window.location.pathname;let slug=null;// Check which project page we're on\nif(currentPath.includes(\"/projects/arrivo\")){slug=\"arrivo\";}else if(currentPath.includes(\"/projects/nike\")){slug=\"nike\";}// If we're not on a supported project page, exit early\nif(!slug){setCurrentSlug(null);return;}// Update the current slug state\nsetCurrentSlug(slug);// Collect image sources using multiple approaches\nconst foundImages=[];// Find images via DOM with a slight delay to ensure it's loaded\nsetTimeout(()=>{try{// Look for images in the document\nconst imgElements=document.querySelectorAll(\"img\");imgElements.forEach(img=>{if(img.src&&!foundImages.includes(img.src)){foundImages.push(img.src);}});// Look for background images in the document\ndocument.querySelectorAll(\"*\").forEach(el=>{const style=window.getComputedStyle(el);const bgImage=style.backgroundImage;if(bgImage&&bgImage!==\"none\"&&bgImage.includes(\"url(\")){const url=bgImage.replace(/^url\\(['\"]?/,\"\").replace(/['\"]?\\)$/,\"\");if(url&&!foundImages.includes(url)){foundImages.push(url);}}});// Log all found images for debugging\nconsole.log(`Found images for ${slug}:`,foundImages);// If we found images, update the state\nif(foundImages.length>0){setImages(foundImages);}}catch(error){console.error(`Error finding images for ${slug}:`,error);}},1e3)// Delay slightly to ensure DOM is loaded\n;},[]);// If we're not on a supported project page, render the component normally\nif(!currentSlug){return /*#__PURE__*/_jsx(Component,{ref:ref,...props});}// Arrivo-specific image selection function\nconst getArrivoImages=()=>{// For arrivo, we want to use images 2, 5, and 6 (indices 1, 4, and 5)\nreturn{col1:images.length>1?images[2]:null,col2:images.length>4?images[3]:null,col3:images.length>5?images[4]:null};};// Nike-specific image selection function\nconst getNikeImages=()=>{// For nike, we could use different images - these are just examples\n// You would replace these with the appropriate indices for nike\nreturn{col1:images.length>2?images[2]:null,col2:images.length>3?images[3]:null,col3:images.length>0?images[0]:null};};// Get the images for the current project\nlet selectedImages;if(currentSlug===\"arrivo\"){selectedImages=getArrivoImages();}else if(currentSlug===\"nike\"){selectedImages=getNikeImages();}else{selectedImages={col1:null,col2:null,col3:null};}// Create the three-column layout\nreturn /*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"1fr 1fr 1fr\",gap:\"16px\",width:\"100%\",height:\"100%\",padding:\"0px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",borderRadius:\"8px\",overflow:\"hidden\",backgroundColor:\"#f5f5f5\"},children:selectedImages.col1?/*#__PURE__*/_jsx(\"img\",{src:selectedImages.col1,alt:`${currentSlug} Column 1`,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}):/*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{width:\"100%\",height:\"100%\"}})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",borderRadius:\"8px\",overflow:\"hidden\",backgroundColor:\"#f5f5f5\"},children:selectedImages.col2?/*#__PURE__*/_jsx(\"img\",{src:selectedImages.col2,alt:`${currentSlug} Column 2`,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#e0e0e0\",color:\"#666\",padding:\"20px\",textAlign:\"center\"},children:/*#__PURE__*/_jsxs(\"p\",{children:[\"Column 2\",/*#__PURE__*/_jsx(\"br\",{}),\"(Image not found)\"]})})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",borderRadius:\"8px\",overflow:\"hidden\",backgroundColor:\"#f5f5f5\"},children:selectedImages.col3?/*#__PURE__*/_jsx(\"img\",{src:selectedImages.col3,alt:`${currentSlug} Column 3`,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#e0e0e0\",color:\"#666\",padding:\"20px\",textAlign:\"center\"},children:/*#__PURE__*/_jsxs(\"p\",{children:[\"Column 3\",/*#__PURE__*/_jsx(\"br\",{}),\"(Image not found)\"]})})})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withThreeColumnGrid\":{\"type\":\"reactHoc\",\"name\":\"withThreeColumnGrid\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestOver.map"],"mappings":"qJAA0G,SAAgB,EAAoB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CACrM,GAAK,CAAC,EAAY,GAAgBA,EAAS,KAAK,CAAM,CAAC,EAAO,GAAWA,EAAS,EAAE,CAAC,CAarF,GAZA,MAAc,CACd,IAAM,EAAY,EAAO,SAAS,SAAa,EAAK,KAEpD,GADG,EAAY,SAAS,mBAAmB,CAAE,EAAK,SAAkB,EAAY,SAAS,iBAAiB,GAAE,EAAK,QAC9G,CAAC,EAAK,CAAC,EAAe,KAAK,CAAC,OAC/B,EAAe,EAAK,CACpB,IAAM,EAAY,EAAE,CACpB,eAAe,CAAC,GAAG,CACD,SAAS,iBAAiB,MAAM,CAAa,QAAQ,GAAK,CAAI,EAAI,KAAK,CAAC,EAAY,SAAS,EAAI,IAAI,EAAE,EAAY,KAAK,EAAI,IAAI,EAAI,CACtJ,SAAS,iBAAiB,IAAI,CAAC,QAAQ,GAAI,CAAyC,IAAM,EAAlC,EAAO,iBAAiB,EAAG,CAAqB,gBAAgB,GAAG,GAAS,IAAU,QAAQ,EAAQ,SAAS,OAAO,CAA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