'use client'; /** * CurrentPeriodCard — Displays the current quarter financial summary. * * Shows "Período actual" heading with the quarter date range and four * financial values formatted in CLP: Saldo actual, Anticipos, Ajustes, * and Ganancias netas. * * Requirements: 4.1, 4.2, 4.3 */ import type { PortalPeriod } from '@/lib/mock-data/types'; import { useCompactCurrencyFormatter } from '@/lib/hooks/useCurrencyFormatter'; import { useTranslation } from '@/lib/hooks/useTranslation'; interface CurrentPeriodCardProps { period: PortalPeriod; } export default function CurrentPeriodCard({ period }: CurrentPeriodCardProps) { const t = useTranslation(); const fmtMoney = useCompactCurrencyFormatter(); return (

{t.portal.currentPeriod}

{period.label}

{t.portal.currentBalance}

{fmtMoney(period.balance)}

{t.portal.advances}

{fmtMoney(period.advances)}

{t.portal.adjustments}

{fmtMoney(period.adjustments)}

{t.portal.netEarnings}

{fmtMoney(period.netEarnings)}

); }