import { formatMoney } from '@/lib/format' import { t } from '@/lib/strings' import { cn } from '@/lib/utils' import type { PeriodSummary } from '@/types/PeriodSummary' const s = t.summary /** * Plan özeti: Gelir − Sabit giderler − Birikim − Devreden borç (+ Devreden artı) = Harcanabilir. * Mobilde 2 sütun, geniş ekranda tek satır. Devir kutucukları yalnızca tutar varsa görünür. */ export function SummaryTiles({ summary }: { summary: PeriodSummary }) { const tiles: { label: string; amount: number; sign?: '−' | '+'; tone?: string }[] = [ { label: s.income, amount: summary.income_total, tone: 'text-income' }, { label: s.fixed, amount: summary.fixed_expense_total, sign: '−' }, { label: s.savings, amount: summary.savings_goal, sign: '−' }, ] if (summary.carryover_debt > 0) { tiles.push({ label: s.debt, amount: summary.carryover_debt, sign: '−', tone: 'text-expense' }) } if (summary.carryover_surplus > 0) { tiles.push({ label: s.surplus, amount: summary.carryover_surplus, sign: '+' }) } return (