"use client";

import Link from "next/link";
import { RequireKind } from "@/lib/session";

const LINKS = [
    ["/staff", "Operations"],
    ["/staff/accounts", "Accounts"],
    ["/staff/licenses", "Licences"],
    ["/staff/plans", "Plans"],
    ["/staff/audit", "Audit"],
] as const;

export default function StaffLayout({ children }: { children: React.ReactNode }) {
    return (
        <RequireKind kind="staff">
            <nav className="border-b border-rule-soft bg-panel-2">
                <div className="mx-auto flex max-w-rail flex-wrap gap-5 px-5 py-2.5 font-mono text-[0.72rem] uppercase tracking-[0.06em]">
                    {LINKS.map(([href, label]) => (
                        <Link key={href} href={href} className="text-ink-3 hover:text-accent">
                            {label}
                        </Link>
                    ))}
                </div>
            </nav>
            <main className="mx-auto max-w-rail px-5 py-8">{children}</main>
        </RequireKind>
    );
}
