import { formatCurrency } from "@/lib/analytics-utils"; export interface SummaryCardProps { icon: string; title: string; value: string; change: number; changePercent: number; isPositive: boolean; subtitle?: string; } /** * Summary metric card with period-over-period comparison indicator. * Used in the Financial Analytics dashboard header row. */ export function SummaryCard({ icon, title, value, change, changePercent, isPositive, subtitle, }: SummaryCardProps) { return (
{title}

{value}

{subtitle && (

{subtitle}

)}
{isPositive ? "+" : ""} {changePercent.toFixed(1)}% ({isPositive ? "+" : ""} {formatCurrency(change)}) so với kỳ trước
); }