"use client"; import React from 'react'; import { Search, ChevronDown } from 'lucide-react'; import { usePathname } from 'next/navigation'; interface EPDHeaderProps { className?: string; } export function EPDHeader({ className = "" }: EPDHeaderProps) { const pathname = usePathname(); // Context detection: Level 2 if URL contains /clients/[id] const isClientContext = pathname.match(/\/epd\/clients\/[^\/]+/); const clientId = isClientContext ? pathname.split('/')[3] : null; // TODO: Fetch actual client data based on clientId // For now, hardcoded demo data const selectedClient = clientId ? { name: "Bas Jansen", id: "CL0002", birthDate: "20-11-1992" } : null; return (
{/* Left: Logo */}
Mini-ECD
{/* Center: Client Selector (only in Level 2) */}
{selectedClient && ( )}
{/* Right: Search */}
); }