import type { FormValueDto } from '@impuestos/contracts'; import { formatGs } from '@impuestos/i18n'; import { cn } from '@/lib/utils'; /** * The declaration laid out the way the official form is, casilla by casilla, so the * numbers can be transcribed straight across into Marangatu. * * The labels are Spanish in every locale, deliberately: this mirrors the DNIT form, and a * form whose labels have been translated is harder to copy from, not easier * (COPY.md multi-language policy). The caption around it says so in the reader's language. */ export function FormPreview({ formCode, period, values, draft, labels, }: { formCode: string; period: string; values: FormValueDto[]; draft: boolean; labels: { title: string; spanishNote: string; casilla: string; concept: string; amount: string; draftMark: string }; }) { // The official designation, Spanish in every locale: COPY.md keeps "Formulario 120" // and "515" as-is in English, and this block mirrors the DNIT form. const officialTitle = `Formulario ${formCode}`; return (

{labels.title}

{labels.spanishNote}
{draft ? ( {labels.draftMark} ) : null}

{officialTitle}

{period}

{values.map((value) => ( ))}
{labels.casilla} {labels.concept} {labels.amount}
{value.casilla} {value.label} {formatGs(value.amount)}
); }