import { CashReportData } from "@/hooks/useCashReport";
import { StatCards as CommonStatCards } from "@/components/reports/common/StatCards";

interface StatCardsProps {
  data: CashReportData | null;
  highlighted: string | null;
  onHighlight: (code: string | null) => void;
}

export function StatCards({ data, highlighted, onHighlight }: StatCardsProps) {
  const currencies = data?.cash_items?.length
    ? Array.from(new Set(data.cash_items.map(i => i.code))).sort()
    : [];

  return (
    <CommonStatCards
      totals={data?.totals?.amount_array_total}
      currencies={currencies}
      highlighted={highlighted}
      onHighlight={onHighlight}
    />
  );
}
