import { Link } from 'react-router-dom';
export default function HistoryPanel({ title, items, render, empty = 'No records yet' }) { return <section className="panel p-5"><h2 className="section-title">{title}</h2>{items.length ? <div className="divide-y divide-white/10">{items.map(item=><div key={item.uuid} className="py-3 text-sm">{render(item)}</div>)}</div> : <p className="text-sm text-slate-500">{empty}</p>}</section> }
export const ProjectHistoryRow=({p,onDuplicate})=><div className="flex items-center justify-between gap-3"><Link className="font-medium text-violet-300" to={`/projects/${p.uuid}`}>{p.project_id} · Rev {p.revision}</Link><button onClick={()=>onDuplicate(p)} className="btn-secondary">Duplicate revision</button></div>;