import Link from 'next/link'; export type NavHeaderConfig = { title: string subtitle?: string icon?: string | { href: string alt?: string size?: number width?: number height?: number } }; export function NavHeader({config, onToggleFold}: { config: NavHeaderConfig onToggleFold?: ()=>void }) { const {title, subtitle, icon: icon0} = config; const icon = typeof icon0 === 'string' ? {href: icon0} : icon0; return
{icon?.href && {icon?.alt}
{title}
{subtitle}
; }