import React from 'react' import UploadDropzone from '../UploadDropzone' import ScreenshotUploader from '../ScreenshotUploader' import UploadProgress from '../UploadProgress' import { machineStates } from '../../../hooks/upload/useUploadMachine' import { getProcessingTransparencyLabel } from '../../../lib/uploadUtils' /** * Step1FileUpload * * Step 1 of the upload wizard: file selection + live upload progress. * Shows the dropzone, optional screenshot uploader (archives), * and the progress panel once an upload is in flight. */ export default function Step1FileUpload({ headingRef, // File state primaryFile, primaryPreviewUrl, primaryErrors, primaryWarnings, fileMetadata, fileSelectionLocked, onPrimaryFileChange, // Archive screenshots isArchive, screenshots, screenshotErrors, screenshotPerFileErrors, onScreenshotsChange, // Machine state machine, showProgress, onRetry, onReset, }) { const processingTransparencyLabel = getProcessingTransparencyLabel( machine.processingStatus, machine.state ) const progressStatus = (() => { if (machine.state === machineStates.ready_to_publish) return 'Ready' if (machine.state === machineStates.uploading) return 'Uploading' if (machine.state === machineStates.processing || machine.state === machineStates.finishing) return 'Processing' return 'Idle' })() return (
Drop or browse a file. Validation runs immediately. Upload starts when you click Start upload.