'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, HardDrive, Workflow, GitBranch, Sparkles, Bell, Zap, Radio, Shield, Users, TrendingUp, Sun, BarChart3, DollarSign, } 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: 'Backup Status', href: '/backup-status', icon: HardDrive, description: 'Veeam backup health and compliance' }, { title: 'Engagement', icon: Users, children: [ { title: 'Overview', href: '/engagement', icon: Users, description: 'Staff activity and engagement metrics', }, { title: 'Employee Profile', href: '/engagement/profile', icon: TrendingUp, description: '12-month activity calendar and performance profile', }, ], }, { title: 'Admin', icon: Activity, children: [ { title: 'Integrations & Sync', href: '/admin/sync', icon: RefreshCw, description: 'Manage sync across PSA, RMM, NMS, Backup, and Apple RMM' }, { 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: 'Zabbix WAN Monitor', href: '/admin/zabbix-wan', icon: Radio, description: 'Sync RMM site WAN IPs to Zabbix with Autotask routing' }, { title: 'Apple RMM Mapping (Addigy)', href: '/addigy-mappings', icon: Smartphone, description: 'Map Addigy devices to companies' }, { title: 'Ticket Workflows', href: '/admin/workflow', icon: Workflow, description: 'Automated ticket triage and classification' }, { title: 'Classification Rules', href: '/admin/workflow/classification-rules', icon: GitBranch, description: 'Keyword-based classification rules' }, { title: 'AI Templates', href: '/admin/workflow/ai-templates', icon: Sparkles, description: 'AI prompt templates for enhancement' }, { title: 'Webhook Pipelines', href: '/admin/workflow/pipelines', icon: Zap, description: 'Automated webhook processing workflows' }, { title: 'Morning NOC Summary', href: '/admin/morning-summary', icon: Sun, description: 'Daily Zabbix overnight summary posted to Teams channels via webhook' }, { title: 'Ticket Digest Reports', href: '/admin/ticket-digest', icon: BarChart3, description: 'LLM-analyzed ticket reports — noise, SLA, workload — daily/weekly/monthly' }, { title: 'Notification Channels', href: '/admin/workflow/channels', icon: Bell, description: 'Teams, Telegram, and webhook notifications' }, { title: 'IT Glue Sync', href: '/admin/sync/itglue', icon: Shield, description: 'IT Glue documentation backup — organizations, configs, passwords, flexible assets' }, { title: 'SentinelOne Sync', href: '/admin/sync/sentinelone', icon: Shield, description: 'SentinelOne EDR — sites, agents, threats sync' }, { title: 'QuickBooks Online', href: '/admin/qbo', icon: DollarSign, description: 'Sync invoices, payments, deposits, transactions and financial reports' }, { 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 */} Wulf Consulting

Pulse

PSA Management System

{/* Main Navigation — centered */} {navigationItems.map((item) => ( {item.children ? ( <> isActive(child.href)) && "bg-primary text-primary-foreground" )}> {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}
}
); }