import React from 'react'; import { motion } from 'framer-motion'; import { Upload, FileText, Clipboard } from 'lucide-react'; const FileUploader = ({ getRootProps, getInputProps, isDragActive, onFileSelect, fileInputRef, onFileChange }) => { const uploadMethods = [ { id: 'drag', icon: , title: 'Drag & Drop', description: 'Drag files directly here', action: 'drag-drop' }, { id: 'browse', icon: , title: 'Browse Files', description: 'Select from computer', action: 'browse' } ]; const handleMethodClick = (method) => { if (method.action === 'browse') { onFileSelect(); } }; return (
e.preventDefault()} onDrop={(e) => { e.preventDefault(); const files = e.dataTransfer.files; if (files.length > 0) { const file = files[0]; onFileChange({ target: { files: [file] } }); } }} >

{isDragActive ? 'Drop files here' : 'Document Processing'}

{isDragActive ? 'Release to process your document' : 'Drag & drop files or click to browse'}

Upload Files
{ // Trigger paste functionality document.execCommand('paste'); }} whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5, delay: 0.1 }} > Paste Image

Supported: PDF, HTML, PNG, JPG, JPEG

); }; export default FileUploader;