import { Loader2 } from "lucide-react"; import { useState } from "react"; import { getAllSourceCodes } from "../adapters/bestiary-index-adapter.js"; import type { BulkImportState } from "../hooks/use-bulk-import.js"; import { Button } from "./ui/button.js"; import { Input } from "./ui/input.js"; const DEFAULT_BASE_URL = "https://raw.githubusercontent.com/5etools-mirror-3/5etools-src/main/data/bestiary/"; interface BulkImportPromptProps { importState: BulkImportState; onStartImport: (baseUrl: string) => void; onDone: () => void; } export function BulkImportPrompt({ importState, onStartImport, onDone, }: BulkImportPromptProps) { const [baseUrl, setBaseUrl] = useState(DEFAULT_BASE_URL); const totalSources = getAllSourceCodes().length; if (importState.status === "complete") { return (
Load stat block data for all {totalSources} sources at once. This will download approximately 12.5 MB of data.