import React, { useState } from 'react'; import { Download, X, ZoomIn, ZoomOut, RotateCw } from 'lucide-react'; const ImagePreview = ({ src, alt, onClose, onDownload }) => { const [scale, setScale] = useState(1); const [rotation, setRotation] = useState(0); const handleZoomIn = () => { setScale(prev => Math.min(prev + 0.25, 3)); }; const handleZoomOut = () => { setScale(prev => Math.max(prev - 0.25, 0.5)); }; const handleRotate = () => { setRotation(prev => (prev + 90) % 360); }; const handleReset = () => { setScale(1); setRotation(0); }; const handleWheel = (e) => { e.preventDefault(); const delta = e.deltaY > 0 ? -0.1 : 0.1; setScale(prev => Math.max(0.5, Math.min(3, prev + delta))); }; return (