"use client";

import { RequireKind } from "@/lib/session";
import { AppBar, type NavLink } from "@/components/AppBar";

const LINKS: NavLink[] = [
    { href: "/staff", label: "Operations" },
    { href: "/staff/accounts", label: "Accounts" },
    { href: "/staff/licenses", label: "Licences" },
    { href: "/staff/plans", label: "Plans" },
    { href: "/staff/catalogue", label: "Catalogue" },
    { href: "/staff/audit", label: "Audit" },
];

export default function StaffLayout({ children }: { children: React.ReactNode }) {
    return (
        <RequireKind kind="staff">
            <AppBar
                links={LINKS}
                staff
                context={
                    <span className="rounded-sm border border-accent px-1.5 py-0.5 font-mono text-[0.64rem] uppercase tracking-[0.12em] text-accent">
                        Staff
                    </span>
                }
            />
            <main className="mx-auto max-w-rail px-5 py-7">{children}</main>
        </RequireKind>
    );
}
