"use client";
import { AlertTriangle, CheckCircle, Clock, Cpu, Tag } from "lucide-react";
import { BriefSchema } from "@/lib/types";
import { formatDate } from "@/lib/utils";
interface AIBriefCardProps {
brief?: BriefSchema | null;
}
export function AIBriefCard({ brief }: AIBriefCardProps) {
if (!brief) {
return (
AI Analysis
Analysis not yet generated. It will appear once the bill text has been processed.
);
}
return (
AI Analysis
{brief.llm_provider}/{brief.llm_model} ยท {formatDate(brief.created_at)}
{brief.summary && (
)}
{brief.key_points && brief.key_points.length > 0 && (
Key Points
{brief.key_points.map((point, i) => (
-
{point}
))}
)}
{brief.risks && brief.risks.length > 0 && (
Risks & Concerns
{brief.risks.map((risk, i) => (
-
{risk}
))}
)}
{brief.deadlines && brief.deadlines.length > 0 && (
Deadlines
{brief.deadlines.map((d, i) => (
-
{d.date ? {formatDate(d.date)}: : ""}
{d.description}
))}
)}
{brief.topic_tags && brief.topic_tags.length > 0 && (
{brief.topic_tags.map((tag) => (
{tag}
))}
)}
);
}