"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { GROUND, INK } from "@/components/m"; import { useStaff } from "@/lib/staffclient"; /* The two-item nav from the design, shown only inside the manager area. * * A ward manager is a staff member who also approves — they wear the uniform too — so this does * not replace the app's own four-item nav. It appears while they are in Approvals or Ward, and * the app bar's back chevron takes them home. The prototype's role-switching chips were a * prototyping device; building a separate manager shell around them would give one person two * apps to remember. */ const ITEMS: [string, string, React.ReactNode][] = [ ["/my/approvals", "Approvals", ], ["/my/ward", "Ward", ], ]; export default function ManagerNav() { const path = usePathname(); const { me } = useStaff(); // Approvals admits somebody with no reports (a request re-addressed to them); /my/ward does // not, so offering it to them was a tab that 404'd. One item, full width, for that reader. const items = ITEMS.filter(([href]) => href !== "/my/ward" || me.isManager); return ( ); }