"use client" import React, { useCallback, useState, useId } from 'react' import { motion, AnimatePresence } from 'framer-motion' import { Button } from './button' import { Progress } from './progress' import { Badge } from './badge' import { cn } from '../../lib/utils' import { Upload, X, File, Image as ImageIcon, Video, Music, FileText, CheckCircle, AlertCircle, Loader2 } from 'lucide-react' export interface FileUploadProps { accept?: string multiple?: boolean maxSize?: number // in bytes maxFiles?: number disabled?: boolean className?: string onUpload?: (files: File[]) => Promise onRemove?: (fileId: string) => void children?: React.ReactNode } interface UploadedFile { id: string file: File progress: number status: 'uploading' | 'success' | 'error' preview?: string } const getFileIcon = (type: string) => { if (type.startsWith('image/')) return if (type.startsWith('video/')) return