{"version":3,"file":"Image_Lightbox.DFDHE4IG.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/fdhRFWMDKu8GAuAubZRM/VYbeVUUJV9y7VpH3kwtL/Image_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=./Image_Lightbox.map"],"mappings":"iLAAqH,SAAgB,EAA4C,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAgB,EAAmB,CAACA,EAAS,IAAY,CAAC,EAAc,EAAiB,CAACA,EAAS,IAAS,CAAC,EAAQ,EAAW,CAACA,EAAS,GAAS,EAAiB,GAAK,CAAC,EAAiB,GAAK,EAAmB,GAAO,EAAC,MAAc,CAAI,GAAiB,eAAe,EAAW,GAAG,GAAM,EAAC,CAAC,EAAgB,EAAE,IAAM,MAAkB,CAAC,EAAW,GAAG,eAAe,EAAmB,IAAO,IAAM,EAAC,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,GAAG,CAAI,EAAE,OAAO,UAAU,OAAO,EAAiB,EAAE,OAAO,IAAO,EAAC,MAAM,CAAC,OAAO,UAAU,CAAC,EAAe,EAAK,QAAQ,CAAC,SAAS;uBACryB,EAAM,UAAU;;;;;;;;;;;;;;;;;;;;;kBAqBrB,EAAE,GAA8B,EAAK,MAAM,CAAC,UAAU,oBAAoB,QAAQ,EAAc,MAAM,CAAS,UAAQ,CAAC,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAc,UAAU,iBAAiB,IAAI,aAAa,EAAE,EAAE,CAAC,CAAG,CAAE"}