{"version":3,"file":"ImageModal.CSsoCPr5.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/A3kSlX00wcnmfQ7k1fQO/XVTiQGpnHMknQknWB8hM/ImageModal.js"],"sourcesContent":["// Image lightbox component with fullscreen overlay and blurred background\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,startTransition,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageModal(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},borderRadius,objectFit,showCloseButton,closeButtonColor,closeButtonTop,closeButtonRight,overlayColor,overlayOpacity,blurAmount,shadow,showMagnifier,magnifierSize,magnifierZoom,style}=props;const[isOpen,setIsOpen]=useState(false);const[showMagnifierGlass,setShowMagnifierGlass]=useState(false);const[magnifierPosition,setMagnifierPosition]=useState({x:0,y:0});const[imagePosition,setImagePosition]=useState({x:0,y:0});useEffect(()=>{if(typeof window!==\"undefined\"){if(isOpen){document.body.style.overflow=\"hidden\";}else{document.body.style.overflow=\"\";}}return()=>{if(typeof window!==\"undefined\"){document.body.style.overflow=\"\";}};},[isOpen]);const handleOpen=()=>{startTransition(()=>setIsOpen(true));};const handleClose=()=>{startTransition(()=>setIsOpen(false));};const handleMouseMove=e=>{if(!showMagnifier)return;const elem=e.currentTarget;const{top,left,width,height}=elem.getBoundingClientRect();const x=e.clientX-left;const y=e.clientY-top;setMagnifierPosition({x:e.clientX,y:e.clientY});setImagePosition({x:x/width*100,y:y/height*100});};const handleMouseEnter=()=>{if(showMagnifier){startTransition(()=>setShowMagnifierGlass(true));}};const handleMouseLeave=()=>{startTransition(()=>setShowMagnifierGlass(false));};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",cursor:\"pointer\"},onClick:handleOpen,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){handleOpen();}},tabIndex:0,role:\"button\",\"aria-label\":\"Open image in fullscreen\",children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:objectFit,borderRadius:borderRadius,display:\"block\",boxShadow:shadow}})}),/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&typeof window!==\"undefined\"&&/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},style:{position:\"fixed\",top:0,left:0,right:0,bottom:0,zIndex:9999,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:`${overlayColor}${Math.round(overlayOpacity*255).toString(16).padStart(2,\"0\")}`,backdropFilter:`blur(${blurAmount}px)`,WebkitBackdropFilter:`blur(${blurAmount}px)`,cursor:showMagnifier?\"none\":\"pointer\",padding:20},onClick:handleClose,onKeyDown:e=>{if(e.key===\"Escape\"){handleClose();}},tabIndex:0,role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Fullscreen image overlay\",children:[/*#__PURE__*/_jsx(motion.img,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{duration:.3},src:image.src,alt:image.alt,style:{maxWidth:\"90vw\",maxHeight:\"90vh\",objectFit:\"contain\",borderRadius:8,boxShadow:shadow,position:\"relative\"},onClick:e=>e.stopPropagation(),onMouseMove:handleMouseMove,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave}),showCloseButton&&/*#__PURE__*/_jsx(motion.button,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{delay:.1},onClick:handleClose,style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:`translate(calc(45vw - ${closeButtonRight}px), calc(-45vh + ${closeButtonTop}px))`,width:40,height:40,borderRadius:\"50%\",backgroundColor:closeButtonColor,border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 2px 8px rgba(0, 0, 0, 0.2)\"},\"aria-label\":\"Close fullscreen image\",children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 5L5 15M5 5L15 15\",stroke:\"white\",strokeWidth:\"2\",strokeLinecap:\"round\"})})}),showMagnifier&&showMagnifierGlass&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",left:magnifierPosition.x-magnifierSize/2,top:magnifierPosition.y-magnifierSize/2,width:magnifierSize,height:magnifierSize,borderRadius:\"50%\",border:\"3px solid rgba(255, 255, 255, 0.8)\",boxShadow:\"0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.2)\",pointerEvents:\"none\",backgroundImage:`url(${image.src})`,backgroundPosition:`${imagePosition.x}% ${imagePosition.y}%`,backgroundSize:`${magnifierZoom*100}%`,backgroundRepeat:\"no-repeat\",zIndex:1e4}})]})})]});}addPropertyControls(ImageModal,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},objectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"cover\",\"contain\"],optionTitles:[\"Cover\",\"Contain\"],defaultValue:\"cover\",displaySegmentedControl:true},showCloseButton:{type:ControlType.Boolean,title:\"Close Button\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},closeButtonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#000000\",hidden:({showCloseButton})=>!showCloseButton},closeButtonTop:{type:ControlType.Number,title:\"Button Top\",defaultValue:20,min:-100,max:200,step:1,unit:\"px\",hidden:({showCloseButton})=>!showCloseButton},closeButtonRight:{type:ControlType.Number,title:\"Button Right\",defaultValue:60,min:-100,max:200,step:1,unit:\"px\",hidden:({showCloseButton})=>!showCloseButton},overlayColor:{type:ControlType.Color,title:\"Overlay Color\",defaultValue:\"#000000\"},overlayOpacity:{type:ControlType.Number,title:\"Overlay Opacity\",defaultValue:.8,min:0,max:1,step:.1},blurAmount:{type:ControlType.Number,title:\"Blur Amount\",defaultValue:10,min:0,max:30,step:1,unit:\"px\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"0 20px 60px rgba(0, 0, 0, 0.3)\"},showMagnifier:{type:ControlType.Boolean,title:\"Magnifier\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},magnifierSize:{type:ControlType.Number,title:\"Magnifier Size\",defaultValue:150,min:50,max:300,step:10,unit:\"px\",hidden:({showMagnifier})=>!showMagnifier},magnifierZoom:{type:ControlType.Number,title:\"Zoom Level\",defaultValue:3,min:1.5,max:10,step:.5,hidden:({showMagnifier})=>!showMagnifier}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageModal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageModal.map"],"mappings":"uQAIG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,CAAC,eAAa,YAAU,kBAAgB,mBAAiB,iBAAe,mBAAiB,eAAa,iBAAe,aAAW,SAAO,gBAAc,gBAAc,gBAAc,SAAO,EAAW,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAM,CAAC,EAAmB,GAAuBA,EAAS,GAAM,CAAM,CAAC,EAAkB,GAAsBA,EAAS,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAM,CAAC,EAAc,GAAkBA,EAAS,CAAC,EA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