{"version":3,"file":"ImageOverlayEditor.BMaeek8O.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/Vcf9KRsOj6CaNfd1yaIP/ZLmbFUIHPR3zuTsMHe5a/ImageOverlayEditor.js"],"sourcesContent":["// Image lightbox component that enlarges image on click with close button\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImageLightbox(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},overlayBackgroundColor,closeButtonColor,closeButtonSize,borderRadius,maxWidth,maxHeight,imageScale}=props;const[isOpen,setIsOpen]=useState(false);const openLightbox=()=>{startTransition(()=>setIsOpen(true));};const closeLightbox=()=>{startTransition(()=>setIsOpen(false));};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",cursor:\"pointer\",...props.style},onClick:openLightbox,children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\",borderRadius:`${borderRadius}px`,transition:\"transform 0.3s ease\"},onMouseEnter:e=>{e.currentTarget.style.transform=\"scale(1.05)\";},onMouseLeave:e=>{e.currentTarget.style.transform=\"scale(1)\";}})}),isOpen&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",backgroundColor:overlayBackgroundColor,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:9999,padding:\"20px\",boxSizing:\"border-box\"},onClick:closeLightbox,children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"calc(100vw - 40px)\",height:\"calc(100vh - 40px)\",overflow:\"auto\"},onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{display:\"block\",borderRadius:`${borderRadius}px`,cursor:\"grab\",width:`${imageScale}%`,height:\"auto\"},draggable:false,onClick:openLightbox}),/*#__PURE__*/_jsx(\"button\",{style:{position:\"absolute\",top:\"-10px\",right:\"-10px\",width:`${closeButtonSize}px`,height:`${closeButtonSize}px`,borderRadius:\"50%\",backgroundColor:closeButtonColor,border:\"none\",cursor:\"pointer\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",fontSize:`${closeButtonSize*.5}px`,color:overlayBackgroundColor,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\"},onClick:closeLightbox,\"aria-label\":\"Close lightbox\",children:\"\\xd7\"})]})})]});}addPropertyControls(ImageLightbox,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},overlayBackgroundColor:{type:ControlType.Color,title:\"Overlay Background\",defaultValue:\"rgba(0, 0, 0, 0.8)\"},closeButtonColor:{type:ControlType.Color,title:\"Close Button Color\",defaultValue:\"#FFFFFF\"},closeButtonSize:{type:ControlType.Number,title:\"Close Button Size\",defaultValue:40,min:20,max:60,step:2,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},maxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:90,min:50,max:100,step:5,unit:\"%\"},maxHeight:{type:ControlType.Number,title:\"Max Height\",defaultValue:90,min:50,max:100,step:5,unit:\"%\"},imageScale:{type:ControlType.Number,title:\"Image Scale\",defaultValue:100,min:50,max:500,step:10,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageLightbox\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=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