'use client'; /** * ClarificationCard Component * * Displays clarification questions from the AI when user input is ambiguous. * Shows: * - Question text * - Multiple choice options as buttons * - Original input for context * - Dismiss option * * Epic: E3 (UI Components) * Story: E3.S3 (ClarificationCard component) */ import { HelpCircle, X } from 'lucide-react'; import { motion } from 'framer-motion'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; interface ClarificationCardProps { question: string; options: string[]; originalInput: string; onSelectOption: (option: string) => void; onDismiss: () => void; } /** * Animation variants for the card */ const cardVariants = { initial: { opacity: 0, y: 10, scale: 0.98 }, animate: { opacity: 1, y: 0, scale: 1, transition: { duration: 0.2, ease: [0.4, 0, 0.2, 1] as const }, }, exit: { opacity: 0, y: -5, scale: 0.98, transition: { duration: 0.15 }, }, }; export function ClarificationCard({ question, options, originalInput, onSelectOption, onDismiss, }: ClarificationCardProps) { return ( {/* Header */}
Verduidelijking nodig
{/* Dismiss button */}
{/* Content */}
{/* Original input context */}
Je zei:{' '} “{originalInput}”
{/* Question */}

{question}

{/* Options grid */}
{options.map((option, index) => ( ))}
{/* Cancel link */}
); }