import Link from "next/link";
import { LogoutButton } from "@/components/logout-button";

export default function AdminLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <div className="min-h-screen bg-gray-50">
      <nav className="bg-white border-b border-gray-200 px-6 py-3 flex items-center gap-6">
        <Link
          href="/admin"
          className="font-semibold text-gray-900 hover:text-brand-600"
        >
          Transportationer Admin
        </Link>
        <Link
          href="/admin"
          className="text-sm text-gray-600 hover:text-gray-900"
        >
          Cities
        </Link>
        <Link
          href="/admin/jobs"
          className="text-sm text-gray-600 hover:text-gray-900"
        >
          Jobs
        </Link>
        <div className="ml-auto flex items-center gap-4">
          <Link href="/" className="text-sm text-gray-500 hover:text-gray-700">
            ← Public Map
          </Link>
          <LogoutButton />
        </div>
      </nav>
      <main className="p-6">{children}</main>
    </div>
  );
}
