import { registration } from "../config/registration.ts";
export function documentLabel(code: string) {
  const key = code.toLowerCase();
  if (key in registration.documentLabels)
    return registration.documentLabels[
      key as keyof typeof registration.documentLabels
    ];
  let match = key.match(/^guardian_(\d+)_cc$/);
  if (match) return `Identificação do responsável ${Number(match[1]) + 1}`;
  match = key.match(/^member_(\d+)_income_(\d+)$/);
  if (match)
    return `Rendimento: elemento ${Number(match[1]) + 1}, comprovativo ${match[2]}`;
  return code.replaceAll("_", " ");
}
