'use client'; /** * Context Bar * * Top bar showing current context: shift, selected patient, user info. * Height: 48px (h-12) */ import { useCortexStore, type ShiftType } from '@/stores/cortex-store'; import { Sun, Moon, Sunrise, Sunset, X, User, ArrowLeft, Users } from 'lucide-react'; import Link from 'next/link'; import { useOffline } from './offline-banner'; const SHIFT_CONFIG: Record = { nacht: { icon: Moon, label: 'Nachtdienst', color: 'text-indigo-600' }, ochtend: { icon: Sunrise, label: 'Ochtenddienst', color: 'text-amber-600' }, middag: { icon: Sun, label: 'Middagdienst', color: 'text-yellow-600' }, avond: { icon: Sunset, label: 'Avonddienst', color: 'text-orange-600' }, }; export function ContextBar() { const { shift, activePatient, setActivePatient, togglePatientSidebar } = useCortexStore(); const isOffline = useOffline(); const shiftConfig = SHIFT_CONFIG[shift]; const ShiftIcon = shiftConfig.icon; return (
{/* Left: Logo + Shift */}
Terug naar EPD
{shiftConfig.label}
{/* Patient Sidebar Toggle (E1.S3) */}
{/* Center: Active Patient */}
{activePatient ? (
{activePatient.name_given[0]?.[0]} {activePatient.name_family[0]}
{activePatient.name_given.join(' ')} {activePatient.name_family}
) : ( Geen patiënt geselecteerd )}
{/* Right: User */}
Verpleegkundige
); }