import jsPDF from 'jspdf';
import { Bot, Sparkles, FileDown, ShieldAlert } from 'lucide-react';
const findings=[['Scan integrity','2 minor margin gaps detected'],['Dentition map','Missing teeth review available'],['Occlusion estimate','1.4 mm posterior clearance'],['Positioning','Suggested axis adjustment: 2.1°']];
const exportReport=()=>{const pdf=new jsPDF();pdf.setFontSize(18);pdf.text('SHiRE Dental AI Review',18,22);pdf.setFontSize(10);pdf.text('Advisory planning report — qualified professional review required.',18,32);findings.forEach(([a,b],i)=>pdf.text(`${a}: ${b}`,18,48+i*12));pdf.text('This report does not diagnose, prescribe, or approve treatment.',18,108);pdf.save('shire-dental-ai-review.pdf')};
const AIAssistant = () => <aside className="glass-panel flex min-h-[480px] flex-col p-4">
  <div className="flex items-center gap-3 border-b border-white/[.06] pb-4">
    <div className="grid h-9 w-9 place-items-center rounded-xl bg-cyan-400/10 text-cyan-300"><Bot /></div><div><h3 className="text-sm font-medium text-white">SHiRE Dental AI</h3><p className="text-[10px] text-slate-600">Explainable planning assistant</p></div><Sparkles className="ml-auto h-4 w-4 text-cyan-400" />
  </div>
  <div className="space-y-2 py-4">{findings.map(([a,b]) => <button key={a} className="w-full rounded-xl border border-white/[.05] bg-white/[.02] p-3 text-left hover:border-cyan-400/20"><span className="text-[10px] uppercase tracking-wider text-cyan-400">{a}</span><p className="mt-1 text-xs text-slate-300">{b}</p><p className="mt-1 text-[10px] text-slate-600">View evidence & explanation →</p></button>)}</div>
  <div className="mt-auto"><div className="mb-3 flex gap-2 rounded-lg bg-amber-400/[.06] p-3 text-[10px] leading-relaxed text-amber-200/70"><ShieldAlert className="h-4 w-4 shrink-0" />AI findings require review by a qualified dental professional. No treatment is automatically approved.</div><button onClick={exportReport} className="flex w-full items-center justify-center gap-2 rounded-lg border border-cyan-400/20 py-2.5 text-xs text-cyan-300"><FileDown className="h-4 w-4" />Export review PDF</button></div>
</aside>;
export default AIAssistant;