'use client'; /** * Context Bar * * Top bar showing current context: shift, selected patient, user info. * Height: 48px (h-12) */ import { useSwiftStore, type ShiftType } from '@/stores/swift-store'; import { Sun, Moon, Sunrise, Sunset, X, User, ArrowLeft } from 'lucide-react'; import Link from 'next/link'; const SHIFT_CONFIG: Record = { nacht: { icon: Moon, label: 'Nachtdienst', color: 'text-indigo-400' }, ochtend: { icon: Sunrise, label: 'Ochtenddienst', color: 'text-amber-400' }, middag: { icon: Sun, label: 'Middagdienst', color: 'text-yellow-400' }, avond: { icon: Sunset, label: 'Avonddienst', color: 'text-orange-400' }, }; export function ContextBar() { const { shift, activePatient, setActivePatient } = useSwiftStore(); const shiftConfig = SHIFT_CONFIG[shift]; const ShiftIcon = shiftConfig.icon; return (
{/* Left: Logo + Shift */}
Swift
{shiftConfig.label}
{/* 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
); }