import { Link } from 'react-router-dom';
import StatusPill from '@/components/workshop/StatusPill';
export default function SessionCard({ session, project }) { return <article className="panel p-5"><div className="flex items-start justify-between"><div><p className="text-xs font-semibold text-violet-400">{project?.project_id || session.project_uuid}</p><h2 className="mt-1 text-lg font-semibold text-white">{session.workflow}</h2></div><StatusPill tone={session.status==='Complete'?'green':'amber'}>{session.status}</StatusPill></div><div className="mt-5 h-2 overflow-hidden rounded-full bg-slate-800"><div className="h-full rounded-full bg-violet-400 transition-all" style={{width:`${session.progress_percent||0}%`}}/></div><p className="mt-2 text-xs text-slate-500">{session.progress_percent||0}% complete</p><Link to={`/measurements/${session.uuid}`} className="btn-primary mt-4 block text-center">{session.status==='Not started'?'Start workflow':'Continue workflow'}</Link></article> }