import React from 'react'; import { Download, LockKeyhole } from 'lucide-react'; import { useScanner } from '@/context/ScannerContext';
const formats=['STL','OBJ','PLY','GLB','Point-cloud PLY','Measurement report','Scan-quality report','Calibration report','Project archive manifest'];
export default function Exports(){const {status,demo}=useScanner();return <div className="mx-auto max-w-5xl"><p className="text-xs uppercase tracking-[.28em] text-purple-300">Verified output manager</p><h2 className="mt-2 text-3xl font-semibold">Exports</h2>{demo&&<div className="mt-5 rounded-xl border border-purple-400/30 bg-purple-500/10 p-3 text-center font-bold tracking-widest text-purple-200">DEMO — NOT A REAL KINECT SCAN</div>}<div className="mt-5 grid gap-5 lg:grid-cols-[1fr_330px]"><div className="grid gap-2 sm:grid-cols-2">{formats.map(f=><button key={f} disabled={status==='offline'||demo} className="flex items-center gap-3 rounded-xl border border-white/10 bg-[#111114] p-4 text-left text-sm disabled:opacity-35"><Download size={17} className="text-purple-300"/>{f}</button>)}</div><aside className="rounded-2xl border border-white/10 bg-[#111114] p-5"><p className="font-semibold">Export requirements</p><ul className="mt-3 space-y-2 text-sm text-zinc-500"><li>• Select a mesh version</li><li>• Choose units and scale</li><li>• Review printability warnings</li><li>• Confirm storage destination</li><li>• Bridge returns SHA-256</li></ul><div className="mt-5 rounded-xl border border-white/10 p-3 text-xs text-zinc-500"><LockKeyhole className="mb-2" size={17}/>SHiREVault must be verified mounted and writable by the bridge. Backup-dependent exports stop if it is unavailable; no unapproved fallback is used.</div></aside></div></div>}