import { requireAdmin } from '@/lib/auth-guard'
import Link from 'next/link'

export default async function AdminLayout({ children }: { children: React.ReactNode }) {
  await requireAdmin()
  return (
    <div className="flex min-h-screen">
      <nav className="w-48 border-r p-4 flex flex-col gap-2">
        <Link href="/admin/users" className="text-sm font-medium text-foreground hover:text-primary">Gebruikers</Link>
        <Link href="/admin/jobs" className="text-sm font-medium text-foreground hover:text-primary">Claude Jobs</Link>
        <Link href="/admin/products" className="text-sm font-medium text-foreground hover:text-primary">Producten</Link>
      </nav>
      <main className="flex-1 p-6">{children}</main>
    </div>
  )
}
