import { useState, useEffect } from "react"; type InputMode = "url" | "bulk" | "upload"; const INPUT_MODES: InputMode[] = ["url", "bulk", "upload"]; export default function InputShowcase() { const [mode, setMode] = useState("url"); const [userInteracted, setUserInteracted] = useState(false); const [visible, setVisible] = useState(true); function switchMode(next: InputMode) { setVisible(false); setTimeout(() => { setMode(next); setVisible(true); }, 200); } useEffect(() => { if (userInteracted) return; const timer = setInterval(() => { setVisible(false); setTimeout(() => { setMode((cur) => { const idx = INPUT_MODES.indexOf(cur); return INPUT_MODES[(idx + 1) % INPUT_MODES.length]; }); setVisible(true); }, 200); }, 3000); return () => clearInterval(timer); }, [userInteracted]); return (

Input

Works with any content source

Paste a blog URL, batch multiple links, or upload your own documents — PDF, PPTX, or DOCX.

{/* Mode tabs — matches real BlogUrlForm style exactly */}
{(["url", "bulk", "upload"] as InputMode[]).map((m) => ( ))}
{/* Content area — fades on mode change */}
{/* Link mode */} {mode === "url" && (

Any blog post, article, or public link. Use a paywall-free link for best results.

)} {/* Multi Link mode */} {mode === "bulk" && (
{[ { url: "https://yourblog.com/article-one" }, { url: "https://yourblog.com/deep-dive-two" }, { url: "" }, ].map((row, i) => (
{/* orientation toggle */}
))}

Add link

)} {/* Upload mode */} {mode === "upload" && (

Drop files here or browse

PDF, Word, PowerPoint

{[ { name: "research-paper.pdf", size: "2.4 MB", ext: "pdf" }, { name: "presentation.pptx", size: "1.1 MB", ext: "pptx" }, ].map((f) => (
{f.name} {f.size} Remove
))}
)}
); }