'use client'; /** * Chat Empty State Component * * Interactive grid of cards shown when the chat has no messages. * Each card represents a main capability category. */ import { motion } from 'framer-motion'; import { FileText, Calendar, Search, ClipboardList } from 'lucide-react'; import { cn } from '@/lib/utils'; interface ChatEmptyStateProps { /** Callback when a quick action card is clicked */ onSelectAction: (text: string) => void; /** Optional active patient name */ activePatientName?: string; } const quickActions = [ { id: 'notitie', icon: FileText, title: 'Dagnotitie maken', description: 'Registreer observaties, medicatie of incidenten', example: 'Notitie [naam] medicatie gegeven', color: 'bg-blue-50 text-blue-600 border-blue-200', hoverColor: 'hover:bg-blue-100 hover:border-blue-300', }, { id: 'agenda', icon: Calendar, title: 'Agenda bekijken', description: 'Bekijk of plan afspraken', example: 'Agenda vandaag', color: 'bg-emerald-50 text-emerald-600 border-emerald-200', hoverColor: 'hover:bg-emerald-100 hover:border-emerald-300', }, { id: 'zoeken', icon: Search, title: 'Patiënt zoeken', description: 'Zoek in dossiers en patiëntgegevens', example: 'Zoek [naam]', color: 'bg-violet-50 text-violet-600 border-violet-200', hoverColor: 'hover:bg-violet-100 hover:border-violet-300', }, { id: 'overdracht', icon: ClipboardList, title: 'Overdracht maken', description: 'Genereer een samenvatting voor de volgende dienst', example: 'Overdracht', color: 'bg-amber-50 text-amber-600 border-amber-200', hoverColor: 'hover:bg-amber-100 hover:border-amber-300', }, ]; const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.08, }, }, }; const cardVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.3, ease: 'easeOut', }, }, }; export function ChatEmptyState({ onSelectAction, activePatientName }: ChatEmptyStateProps) { const handleCardClick = (example: string) => { // Replace [naam] with patient name if available const text = activePatientName ? example.replace(/\[naam\]/g, activePatientName) : example; onSelectAction(text); }; return (
Typ of spreek wat je wilt doen. Klik op een kaart om snel te starten.
{action.description}
“{displayExample}”