import type { Metadata } from 'next';
import type { ReactNode } from 'react';

import Link from 'next/link';

import { nav, navLink, wrap } from '@/lib/adminUi';

export const metadata: Metadata = {
  title: 'Admin — Catherine League',
  robots: 'noindex, nofollow',
};

export default function AdminRootLayout({ children }: { children: ReactNode }) {
  return (
    <div className={wrap}>
      <nav className={nav}>
        <Link className={navLink} href="/">
          ← Site
        </Link>
        <Link className={navLink} href="/admin/login">
          Login
        </Link>
        <Link className={navLink} href="/admin/register">
          Register
        </Link>
        <Link className={navLink} href="/admin">
          Dashboard
        </Link>
      </nav>
      {children}
    </div>
  );
}
