'use client'; import { usePathname } from 'next/navigation'; import Link from 'next/link'; import { cn } from '@/lib/utils'; import { LayoutDashboard, Server, Network, Globe, Smartphone, Database, RefreshCw, ChevronDown, Activity } from 'lucide-react'; import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle, } from '@/components/ui/navigation-menu'; import { Button } from '@/components/ui/button'; import { ThemeToggle } from '@/components/theme-toggle'; interface NavItem { title: string; href?: string; icon?: React.ElementType; description?: string; children?: NavItem[]; } const navigationItems: NavItem[] = [ { title: 'Dashboard', href: '/', icon: LayoutDashboard, description: 'Overview and quick access' }, { title: 'Configuration Items', href: '/configuration-items', icon: Server, description: 'Manage IT assets and devices' }, { title: 'Admin', icon: Activity, children: [ { title: 'Sync Management', href: '/admin/sync', icon: RefreshCw, description: 'Sync data from external systems' }, { title: 'NMS Mapping (Auvik)', href: '/auvik-mappings', icon: Network, description: 'Map Auvik tenants to companies' }, { title: 'RMM Mapping (Datto)', href: '/rmm-mappings', icon: Globe, description: 'Map RMM sites to companies' }, { title: 'Apple RMM Mapping (Addigy)', href: '/addigy-mappings', icon: Smartphone, description: 'Map Addigy devices to companies' }, { title: 'Data Browser', href: '/admin/data-browser', icon: Database, description: 'Browse and query system data' }, ] }, ]; export function AppNavigation() { const pathname = usePathname(); const isActive = (href?: string) => { if (!href) return false; return pathname === href || pathname.startsWith(href + '/'); }; return (
{/* Logo and App Name */}

Pulse

PSA Management System

{/* Main Navigation */} {navigationItems.map((item) => ( {item.children ? ( <> isActive(child.href)) && "bg-accent" )}> {item.icon && } {item.title}
    {item.children.map((child) => (
  • {child.icon && } {child.title}
    {child.description && (

    {child.description}

    )}
  • ))}
) : ( {item.icon && } {item.title} )}
))}
{/* Right Side Actions */}
); } // Breadcrumb component for secondary navigation export interface BreadcrumbItem { label: string; href?: string; } interface PageHeaderProps { title: string; description?: string; breadcrumbs?: BreadcrumbItem[]; actions?: React.ReactNode; } export function PageHeader({ title, description, breadcrumbs, actions }: PageHeaderProps) { return (
{/* Breadcrumbs */} {breadcrumbs && breadcrumbs.length > 0 && ( )} {/* Title and Actions */}

{title}

{description && (

{description}

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