import React, { useRef, useState } from "react"; const LensViewer = ({ zoomAmount, lensSize, sanitizedImagePath, sanitizedUpscaledImagePath, }: { zoomAmount: string; lensSize: number; sanitizedImagePath: string; sanitizedUpscaledImagePath: string; }) => { const [hoverPosition, setHoverPosition] = useState({ x: 0, y: 0 }); const zoomLevel = 4; // Adjust zoom level as needed const handleMouseMove = (e: React.MouseEvent) => { const { left, top, width, height } = e.currentTarget.getBoundingClientRect(); const x = ((e.clientX - left) / width) * 100; const y = ((e.clientY - top) / height) * 100; setHoverPosition({ x, y }); }; const originalImage = "file:///" + sanitizedImagePath; const upscaledImage = "file:///" + sanitizedUpscaledImagePath; return (