'use client' import { PitchFinancial, Language } from '@/lib/types' import { t } from '@/lib/i18n' import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer, Line, ComposedChart, Area, } from 'recharts' interface FinancialChartProps { financials: PitchFinancial[] lang: Language growthMultiplier?: number } export default function FinancialChart({ financials, lang, growthMultiplier = 1 }: FinancialChartProps) { const i = t(lang) const data = financials.map((f) => ({ year: f.year, [i.financials.revenue]: Math.round(f.revenue_eur * growthMultiplier), [i.financials.costs]: f.costs_eur, [i.financials.customers]: Math.round(f.customers_count * growthMultiplier), })) const formatValue = (value: number) => { if (value >= 1_000_000) return `${(value / 1_000_000).toFixed(1)}M` if (value >= 1_000) return `${(value / 1_000).toFixed(0)}k` return value.toString() } return (