'use client'; import type { ReactNode } from 'react'; import { ArrowLeft } from '@/components/icons'; import { cn } from '@/lib/utils'; import { AdminLink } from './admin-link'; interface AdminPageHeaderProps { title: ReactNode; description?: ReactNode; /** Buttons on the end side of the header. */ actions?: ReactNode; /** A link back to the parent page, for detail pages. */ back?: { href: string; label: string }; /** Something between the back link and the title, such as an icon. */ leading?: ReactNode; className?: string; } /** * The header of an admin page. The mobile shell already shows the page name * in its top bar, so the title itself is desktop-only there; the * description and the actions stay. */ export function AdminPageHeader({ title, description, actions, back, leading, className }: AdminPageHeaderProps) { return (
{back && ( {back.label} )}
{leading}

{title}

{description &&

{description}

}
{actions &&
{actions}
}
); }