import { useEffect, useState } from 'react'; import { SearchIcon } from 'lucide-react'; import { cn } from '@documenso/ui/lib/utils'; export type AnimatedDocumentScannerProps = { className?: string; interval?: number; }; export const AnimatedDocumentScanner = ({ className, interval = 2500, }: AnimatedDocumentScannerProps) => { const [magPosition, setMagPosition] = useState({ x: 0, y: 0, page: 0 }); useEffect(() => { const moveInterval = setInterval(() => { setMagPosition({ x: Math.random() * 60 - 30, y: Math.random() * 50 - 25, page: Math.random() > 0.5 ? 1 : 0, }); }, interval); return () => clearInterval(moveInterval); }, [interval]); return (
{/* Magnifying glass */}
{/* Book container */}
{/* Left page */}
{/* Right page */}
); };