import Link from 'next/link';
import { AdminShell, EmptyState, StatusPill } from '../components/admin/admin-page.jsx';
import { listInstalledAgents } from '../../lib/team.js';
export const dynamic='force-dynamic';
export default function TeamPage(){ const agents=listInstalledAgents(); return <AdminShell kicker="Team" title="My Team" description="Manage installed agents by project, role, engine, and status." actions={<Link className="admin-button" href="/marketplace?kind=agent">Install from marketplace</Link>}><section className="team-shell" data-page="team">{agents.length?agents.map(a=><Link href={`/team/${a.agent_id}`} className="team-card" key={a.agent_id}><div><h2>{a.name}</h2><p>from template: {a.template_slug} · {a.project_name}</p></div><StatusPill>{a.agent_status}</StatusPill></Link>):<EmptyState title="No installed agents">Install agents from the marketplace.</EmptyState>}</section></AdminShell>; }
