import { displayReportMoney, type InvestmentReportTable, } from '@/lib/integral-financial-report'; import { financialIssuesForDisplay } from '@/lib/financial-issue-presentation'; export function InvestmentReportTables({ tables, }: { tables: InvestmentReportTable[]; }) { const issues = financialIssuesForDisplay(tables); return (
{issues.length > 0 && ( )} {tables.map((table) => (

{table.title}

{table.rows.length > 0 && (
{table.headers.map((header, index) => ( ))} {table.rows.map((row, i) => ( {row.map((cell, j) => j === 0 ? ( ) : ( ), )} ))}
{table.title}
{header}
{cell} {displayReportMoney( cell, )}
)} {table.notes.map((note, i) => (

{note}

))}
))}
); }