{"version":3,"file":"Spin.BvbNlRXs.mjs","names":["_Fragment","e"],"sources":["https:/framerusercontent.com/modules/zKY2GTYFJnx4fRK4Rcj2/wIMJuSHU9jt78bJyFInb/Spin.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{motion,useAnimation}from\"framer-motion\";import React from\"react\";import{useState,useEffect}from\"react\";export function withControlledPauseRotation(Component){return props=>{const controls=useAnimation();const pauseDuration=props.pauseDuration||2.5// Default is 1 second if not passed in props\n;const startDelay=props.startDelay||1// Default is no delay if not passed in props\n;const startRotationWithPause=()=>{controls.start({rotateY:360,transition:{duration:1,repeat:Infinity,repeatDelay:pauseDuration,ease:\"easeInOut\"}});};React.useEffect(()=>{const timeoutId=setTimeout(startRotationWithPause,startDelay*1e3)// setTimeout uses milliseconds\n;// Clean up function to clear the timeout if the component is unmounted before the timeout finishes\nreturn()=>clearTimeout(timeoutId);},[]);return /*#__PURE__*/_jsx(Component,{...props,as:motion.div,style:{...props.style,transformOrigin:\"center\"},animate:controls});};}export const withLoop=Component=>{return props=>/*#__PURE__*/_jsx(motion.div,{style:{perspective:\"500px\"},children:/*#__PURE__*/_jsx(Component,{...props,as:motion.div,style:{},animate:{rotate:360,transition:{duration:2,ease:\"anticipate\",repeat:Infinity,repeatDelay:0,delay:0}}})});};export function Lightbox(Component){return props=>{const[lightboxDisplay,setLightboxDisplay]=useState(false);const[selectedImage,setSelectedImage]=useState(\"\");const[opacity,setOpacity]=useState(0);const handleImageClick=src=>{setSelectedImage(src);setLightboxDisplay(true);};useEffect(()=>{if(lightboxDisplay){setTimeout(()=>setOpacity(1),10);}},[lightboxDisplay]);const closeLightbox=()=>{setOpacity(0);setTimeout(()=>setLightboxDisplay(false),300);};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,onClick:e=>{if(e.target.tagName===\"IMG\"){handleImageClick(e.target.src);}}}),/*#__PURE__*/_jsx(\"style\",{children:`\n                    .${props.className} img {\n                        cursor: zoom-in;\n                    }\n                    .lightbox-backdrop {\n                        position: fixed;\n                        top: 0;\n                        left: 0;\n                        width: 100vw;\n                        height: 100vh;\n                        background-color: rgba(0, 0, 0, 0.8);\n                        display: flex;\n                        align-items: center;\n                        justify-content: center;\n                        z-index: 1000;\n                        opacity: 0;\n                        transition: opacity 0.3s ease;\n                    }\n                    .lightbox-image {\n                        max-height: 90%;\n                        max-width: 90%;\n                        border-radius: 12px;\n                    }\n                `}),lightboxDisplay&&/*#__PURE__*/_jsx(\"div\",{className:\"lightbox-backdrop\",onClick:closeLightbox,style:{opacity:opacity},children:/*#__PURE__*/_jsx(\"img\",{src:selectedImage,className:\"lightbox-image\",alt:\"Fullscreen\"})})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withLoop\":{\"type\":\"reactHoc\",\"name\":\"withLoop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Lightbox\":{\"type\":\"reactHoc\",\"name\":\"Lightbox\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withControlledPauseRotation\":{\"type\":\"reactHoc\",\"name\":\"withControlledPauseRotation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Spin.map"],"mappings":"6OAAoM,SAAS,EAA4B,EAAU,CAAC,MAAO,CAAA,GAAO,CAEjQ,IAFwQ,EAAS,GAAc,CAAO,EAAc,EAAM,eAAe,IACnU,EAAW,EAAM,YAAY,EAC7B,EAAuB,IAAI,CAAC,EAAS,MAAM,CAAC,QAAQ,IAAI,WAAW,CAAC,SAAS,EAAE,OAAO,IAAS,YAAY,EAAc,KAAK,WAAY,CAAC,EAAC,AAAE,EAE7G,MAF8G,GAAM,UAAU,IAAI,CAAC,IAAM,EAAU,WAAW,EAAuB,EAAW,IAAI,CAE5O,MAAM,IAAI,aAAa,EAAU,AAAE,EAAC,CAAE,EAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EA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