import { useTranslation } from "../../i18n"; import { useCurrency } from "../../hooks/useCurrency"; import { fmtInt, fmtPct, fmtTokens } from "../../lib/dashboard-format"; import { modelColor } from "./DailyBars"; import type { ModelRow } from "../../types/dashboard"; interface ModelTotalsChartProps { /** Provider-agnostic model totals, pre-sorted by totalTokens desc. */ rows: ModelRow[]; } /** Horizontal ranked bars: one row per bare model name, providers merged. */ export function ModelTotalsChart({ rows }: ModelTotalsChartProps) { const { t } = useTranslation(); const { money } = useCurrency(); if (!rows.length) { return (