{"version":3,"file":"ZoomIn_1.CP_Mv7Gs.mjs","names":["useState","useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/g7JQdccgAuAroMjCuFbZ/JcvZLaB31d6v8iHUIUby/ZoomIn_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useCallback}from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * ImageZoom - A component that displays an image with zoom and fullscreen capabilities\n *\n * Features:\n * - Click to open fullscreen mode\n * - In fullscreen: click to zoom, click again to reset zoom\n * - When zoomed: hover to pan around the image\n * - ESC or close button to exit fullscreen\n *\n * @component\n * @param {Object} props\n * @param {string} props.imageUrl - URL of the image to display\n *\n * @example\n * return (\n *   <ImageZoom imageUrl=\"https://example.com/my-image.jpg\" />\n * )\n */export function ImageZoom(props){const{imageUrl}=props;const[isFullscreen,setIsFullscreen]=useState(false);const[isZoomed,setIsZoomed]=useState(false);const[position,setPosition]=useState({x:50,y:50});const toggleFullscreen=()=>{setIsFullscreen(!isFullscreen);if(!isFullscreen){document.body.style.overflow=\"hidden\";}else{document.body.style.overflow=\"auto\";setIsZoomed(false);setPosition({x:50,y:50});}};const handleZoom=e=>{if(isZoomed){setIsZoomed(false);setPosition({x:50,y:50});return;}const rect=e.currentTarget.getBoundingClientRect();const x=(e.clientX-rect.left)/rect.width*100;const y=(e.clientY-rect.top)/rect.height*100;setPosition({x,y});setIsZoomed(true);};const handleMouseMove=useCallback(e=>{if(!isZoomed)return;const rect=e.currentTarget.getBoundingClientRect();const x=(e.clientX-rect.left)/rect.width*100;const y=(e.clientY-rect.top)/rect.height*100;const constrainedX=Math.max(0,Math.min(100,x));const constrainedY=Math.max(0,Math.min(100,y));setPosition({x:constrainedX,y:constrainedY});},[isZoomed]);return /*#__PURE__*/_jsx(_Fragment,{children:!isFullscreen?/*#__PURE__*/_jsx(Frame,{style:{backgroundImage:`url(${imageUrl})`,backgroundSize:\"contain\",backgroundPosition:\"center\",backgroundRepeat:\"no-repeat\",backgroundColor:\"transparent\",cursor:\"pointer\",border:\"none\",height:\"100%\",width:\"100%\",margin:\"0 auto\"},onClick:toggleFullscreen,width:\"100%\",height:\"100%\"}):/*#__PURE__*/_jsxs(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",background:\"rgba(13,22,28,0.85)\",zIndex:9999,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(motion.div,{style:{position:\"relative\",width:\"90%\",height:\"90%\",maxWidth:\"1400px\",maxHeight:\"90vh\",margin:\"auto\"},children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundImage:`url(${imageUrl})`,backgroundSize:isZoomed?\"200%\":\"contain\",backgroundPosition:`${position.x}% ${position.y}%`,backgroundRepeat:\"no-repeat\",cursor:isZoomed?\"move\":\"zoom-in\",transition:isZoomed?\"none\":\"all 0.3s ease\"},onClick:handleZoom,onMouseMove:handleMouseMove})}),/*#__PURE__*/_jsx(\"button\",{style:{position:\"absolute\",top:98,right:20,padding:\"10px 15px\",backgroundColor:\"rgba(13,22,28,0.85)\",color:\"white\",border:\"none\",borderRadius:\"5px\",cursor:\"pointer\",zIndex:1e4},onClick:e=>{e.stopPropagation();toggleFullscreen();},children:\"X\"})]})});}addPropertyControls(ImageZoom,{imageUrl:{type:ControlType.Image,title:\"Floor Plan Image\",defaultValue:\"https://via.placeholder.com/600\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ImageZoom\":{\"type\":\"reactComponent\",\"name\":\"ImageZoom\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ZoomIn_1.map"],"mappings":"wPAiBG,SAAgB,EAAU,EAAM,CAAC,GAAK,CAAC,YAAU,EAAW,C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