// Factor Activo — seed data (realistic individual-investor portfolio)

const CONTRACTS = [
  { id: 'FA-0428', counterparty: 'Andina Logística S.A.',   amount: 48500, rate: 11.2, status: 'active',  signed: '2026-01-14', maturity: '2026-06-22', progress: 62, decision: { withdraw: 10000 } },
  { id: 'FA-0435', counterparty: 'Textiles Norte',         amount: 24200, rate: 12.5, status: 'pending', signed: null,         maturity: '2026-07-01', progress: 0  },
  { id: 'FA-0419', counterparty: 'Verde Agro Export',      amount: 91000, rate: 10.4, status: 'active',  signed: '2025-09-22', maturity: '2026-04-28', progress: 94, awaitingDecision: true },
  { id: 'FA-0437', counterparty: 'Hidroeléctrica Chacra',  amount: 56000, rate: 11.0, status: 'pending', signed: null,         maturity: '2026-08-15', progress: 0  },
  { id: 'FA-0402', counterparty: 'Cobre Andino Mining',    amount: 135000, rate: 9.2, status: 'closed',  signed: '2025-04-10', maturity: '2026-02-10', progress: 100 },
];

const EVENTS = [
  { id: 'e1', date: '2026-04-22', type: 'sign',      title: 'Firma digital · Textiles Norte',         subtitle: 'Contrato FA-0435 · $24,200', urgent: true },
  { id: 'e2', date: '2026-04-28', type: 'withdraw',  title: 'Retiro disponible · Verde Agro Export',  subtitle: 'Vencimiento FA-0419 · $91,000' },
  { id: 'e3', date: '2026-05-05', type: 'sign',      title: 'Firma digital · Hidroeléctrica Chacra',  subtitle: 'Contrato FA-0437 · $56,000' },
  { id: 'e4', date: '2026-05-08', type: 'withdraw',  title: 'Retiro disponible · Grupo Marítimo',     subtitle: 'Vencimiento FA-0421 · $72,000' },
  { id: 'e5', date: '2026-06-22', type: 'withdraw',  title: 'Retiro disponible · Andina Logística',   subtitle: 'Vencimiento FA-0428 · $48,500' },
  { id: 'e6', date: '2026-07-15', type: 'review',    title: 'Revisión trimestral de portafolio',      subtitle: 'Reunión virtual · 15:00 GMT-5' },
];

const NOTIFS = [
  { id: 'n1', unread: true,  type: 'new_contract', title: 'Nuevo contrato disponible', body: 'Textiles Norte ofrece un contrato de factoring por $24,200 al 12.5% anual.', time: 'hace 12 min', contractId: 'FA-0435' },
  { id: 'n2', unread: true,  type: 'new_contract', title: 'Nuevo contrato disponible', body: 'Hidroeléctrica Chacra · $56,000 al 11.0% anual.',                              time: 'hace 3 h',   contractId: 'FA-0437' },
  { id: 'n3', unread: false, type: 'payment',      title: 'Pago recibido',             body: 'Cobre Andino Mining liquidó $135,000 a tu balance disponible.',               time: 'ayer',       contractId: 'FA-0402' },
  { id: 'n4', unread: false, type: 'reminder',     title: 'Vencimiento próximo',       body: 'Verde Agro Export vence el 28 de abril — retiro automático activo.',         time: 'hace 2 días', contractId: 'FA-0419' },
];

// Current balance + 12-month projection (actual last 4, projected next 8)
const BALANCE = {
  available: 142850,
  invested:  431200,
  expected12m: 61480, // interest + principal returns
  ytdReturn: 7.2,
};

// Monthly cashflow in/out of balance — last 4 actual + next 8 projected
const PROJECTION = {
  labels: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
  values: [118, 124, 131, 142, 156, 171, 168, 184, 202, 219, 241, 268], // $k
  actualCount: 4, // first 4 are actual
};

Object.assign(window, { CONTRACTS, EVENTS, NOTIFS, BALANCE, PROJECTION });
