+ {!isImporting && !isAnalyzing && (
+ <>
+ {/* Drag and Drop Area */}
+
+
{
+ const files = e.target.files;
+ if (files && files.length > 0) {
+ handleFileSelect(files[0]);
+ }
+ }}
+ accept=".zip"
+ className="hidden"
+ disabled={isImporting || isAnalyzing}
+ />
+
+
+
+ {selectedFile ? (
+
+ ) : (
+
+ )}
+
+
+
+ {selectedFile ? (
+
+
+ {selectedFile.name}
+
+
+ {(selectedFile.size / 1024 / 1024).toFixed(2)} MB
+
+
+
+ ) : (
+
+
+ Drop your ZIP file here or click to browse
+
+
+ Supports ZIP files containing exported Shakespeare projects
+
+
+ )}
+
+
+
+
+ {/* Error Display */}
+ {error && (
+
+ )}
+
+ {/* Project List */}
+ {discoveredProjects.length > 0 && (
+
+
+
+ Found {discoveredProjects.length} project{discoveredProjects.length !== 1 ? 's' : ''}
+
+
+
+
+
+
+
+
+
+
+ {discoveredProjects.map((project) => (
+
+
handleProjectToggle(project.id, checked as boolean)}
+ className="mt-1"
+ />
+
+
+
+
{project.name}
+ {/* Show conflict indicator inline on larger screens */}
+ {project.isConflict && (
+
+ )}
+
+
+ {/* Mobile conflict indicator on its own line */}
+ {project.isConflict && (
+
+
+
Conflict - Will overwrite existing project
+
+ )}
+
+
+ {project.files.length} file{project.files.length !== 1 ? 's' : ''}
+ {/* Only show overwrite text on desktop when conflict exists */}
+ {project.isConflict && • Will overwrite existing project}
+
+
+
+ ))}
+
+
+
+
+ )}
+
+ {/* Import Button */}
+ {discoveredProjects.length > 0 && (
+
+
+
+
+ )}
+ >
+ )}
+
+ {/* Analysis Progress */}
+ {isAnalyzing && (
+
+
+
+ Analyzing ZIP file...
+
+
+ Discovering projects and checking for conflicts...
+
+
+ )}
+
+ {/* Import Progress */}
+ {isImporting && (
+
+
+
+ Importing {selectedProjects.length} project{selectedProjects.length !== 1 ? 's' : ''}...
+
+
+
+ Extracting files and setting up projects...
+
+
+ )}
+
+ {/* Success State */}
+ {!isImporting && !isAnalyzing && importProgress === 100 && (
+
+
+ Projects imported successfully!
+
+ )}
+
+