import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faUser, faCalendarCheck, faPhone } from '@fortawesome/pro-duotone-svg-icons'; import { Badge } from '@/components/base/badges/badges'; export type CallerSummary = { name: string; phone: string; isNew: boolean; aiSummary?: string | null; leadSource?: string | null; utmCampaign?: string | null; nextAppointment?: { scheduledAt: string; doctorName: string; department: string } | null; lastAppointment?: { scheduledAt: string; status: string; department: string } | null; }; interface AiSummaryCardProps { caller: CallerSummary | null; } const formatDate = (dateStr: string): string => { const d = new Date(dateStr); return d.toLocaleDateString('en-IN', { day: 'numeric', month: 'short' }); }; export const AiSummaryCard = ({ caller }: AiSummaryCardProps) => { if (!caller) { return (
Select a patient or receive a call
{caller.aiSummary}
)} {(caller.leadSource || caller.utmCampaign) && (