{"version":3,"file":"Lightbox.CNmM58DX.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/KW0BDBr9hLF4u84A4OUh/ZOVEbYLrBKgR5cvWISqJ/Lightbox.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function CMSContentImageLightboxWithSmoothTransition(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);}},style:{cursor:\"pointer\"}}),/*#__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                    }\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\":{\"CMSContentImageLightboxWithSmoothTransition\":{\"type\":\"reactHoc\",\"name\":\"CMSContentImageLightboxWithSmoothTransition\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Lightbox.map"],"mappings":"iLAAqH,SAAgB,EAA4C,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAgB,GAAoBA,EAAS,GAAM,CAAM,CAAC,EAAc,GAAkBA,EAAS,GAAG,CAAM,CAAC,EAAQ,GAAYA,EAAS,EAAE,CAAO,EAAiB,GAAK,CAAC,EAAiB,EAAI,CAAC,EAAmB,GAAK,EAAG,MAAc,CAAI,GAAiB,eAAe,EAAW,EAAE,CAAC,GAAG,EAAI,CAAC,EAAgB,CAAC,CAAC,IAAM,MAAkB,CAAC,EAAW,EAAE,CAAC,eAAe,EAAmB,GAAM,CAAC,IAAI,EAAG,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,GAAG,CAAI,EAAE,OAAO,UAAU,OAAO,EAAiB,EAAE,OAAO,IAAI,EAAI,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC,CAAc,EAAK,QAAQ,CAAC,SAAS;uBACryB,EAAM,UAAU;;;;;;;;;;;;;;;;;;;;;kBAqBrB,CAAC,CAAC,GAA8B,EAAK,MAAM,CAAC,UAAU,oBAAoB,QAAQ,EAAc,MAAM,CAAS,UAAQ,CAAC,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAc,UAAU,iBAAiB,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAtBjK,IAAsC"}