import { useState } from "react"; const PreviewDocument = ({ imageUrl }) => { const [loading, setLoading] = useState(true); const [rotation, setRotation] = useState(0); const [scale, setScale] = useState(1); const zoomIn = () => setScale((prev) => Math.min(prev + 0.2, 3)); const zoomOut = () => setScale((prev) => Math.max(prev - 0.2, 0.4)); const resetAll = () => { setRotation(0); setScale(1); }; return ( <>