// Upload & Order — file-first flow const { useState: useStateU, useRef: useRefU } = React; const UP_PRODUCTS = ['Business Cards', 'Flyers & Leaflets', 'Roll-up Banner', 'Signage', 'Exhibition Graphics', 'Vehicle Wraps', 'T-shirts', 'Letterhead', 'Other']; const UP_DEADLINES = ['24-hour express', '2 working days', 'This week', 'Flexible']; function Upload() { const { go } = useRouter(); const [files, setFiles] = useStateU([]); const [drag, setDrag] = useStateU(false); const [product, setProduct] = useStateU('Business Cards'); const [qty, setQty] = useStateU('500'); const [deadline, setDeadline] = useStateU('24-hour express'); const [notes, setNotes] = useStateU(''); const [name, setName] = useStateU(''); const [phone, setPhone] = useStateU(''); const [step, setStep] = useStateU(1); // 1=files+spec, 2=contact, 3=confirm const [submitted, setSubmitted] = useStateU(false); const fileInput = useRefU(null); const addFiles = (newFiles) => { const arr = Array.from(newFiles).map(f => ({ name: f.name, size: f.size, type: f.type })); setFiles(prev => [...prev, ...arr]); }; const removeFile = (i) => setFiles(prev => prev.filter((_, idx) => idx !== i)); const onDrop = (e) => { e.preventDefault(); setDrag(false); if (e.dataTransfer.files) addFiles(e.dataTransfer.files); }; const summary = `Hi Arabian Prints, I've uploaded artwork for an order.\n\n• Product: ${product}\n• Quantity: ${qty}\n• Deadline: ${deadline}\n• Files: ${files.length}\n${notes ? '\n' + notes : ''}`; if (submitted) { return (
{ e.preventDefault(); go('home'); }}>Home / Order placed

Order received.
We're on it.

Thanks {name.split(' ')[0] || 'there'}. We've got {files.length} file{files.length === 1 ? '' : 's'} and your spec. A studio operator will preflight your artwork and call you on {phone || PHONE} within the hour.

Open WhatsApp { e.preventDefault(); setSubmitted(false); setStep(1); setFiles([]); setName(''); setPhone(''); setNotes(''); }}>Place another order { e.preventDefault(); go('home'); }}>Back to home
Order reference

#AP-{Math.floor(Math.random() * 90000 + 10000)}

Product
{product}
Quantity
{qty}
Deadline
{deadline}
Files
{files.length} preflighting
Status
● Awaiting preflight
); } return (
{ e.preventDefault(); go('home'); }}>Home / Upload & Order

Upload & order.
Skip the back-and-forth.

Already have your artwork ready? Drop the file, pick the format, tell us when you need it. We'll preflight your PDF and call you to confirm — usually within the hour.

{/* Step progress */}
{[ { n: 1, label: 'Upload + spec' }, { n: 2, label: 'Your details' }, { n: 3, label: 'Confirm' }, ].map(s => (
Step 0{s.n}
{s.label}
))}
{step === 1 && ( <>
fileInput.current && fileInput.current.click()} onDragOver={(e) => { e.preventDefault(); setDrag(true); }} onDragLeave={() => setDrag(false)} onDrop={onDrop} >
Drop your artwork here
or click to browse files
PDF · AI · PSD · TIFF · JPG · PNG · ZIP · max 200 MB
e.target.files && addFiles(e.target.files)} />
{files.length > 0 && (
{files.map((f, i) => (
{f.name} {formatSize(f.size)} removeFile(i)}>
))}
)}
What are we printing?
{UP_PRODUCTS.map(p => ( ))}
setQty(e.target.value)} placeholder="e.g. 500, 1000" />