// Tirelire.ch — categories and seed data

const CATEGORIES = [
  { id: 'logement',    label: 'Logement',     emoji: '🏠', color: '#1E8E5C', bucket: 'besoins' },
  { id: 'alimentation',label: 'Alimentation', emoji: '🥖', color: '#4CC689', bucket: 'besoins' },
  { id: 'transport',   label: 'Transport',    emoji: '🚆', color: '#73B89A', bucket: 'besoins' },
  { id: 'loisirs',     label: 'Loisirs',      emoji: '🎬', color: '#F2C035', bucket: 'envies' },
  { id: 'vetements',   label: 'Vêtements',    emoji: '👕', color: '#E4A82B', bucket: 'envies' },
  { id: 'restos',      label: 'Restos',       emoji: '🍝', color: '#D49826', bucket: 'envies' },
  { id: 'pilier3',     label: '3e Pilier',    emoji: '🏛️', color: '#3D3D3D', bucket: 'epargne' },
  { id: 'sante',       label: 'Santé',        emoji: '⚕️',  color: '#94CFA8', bucket: 'besoins' },
  { id: 'epargne',     label: 'Épargne',      emoji: '🐷', color: '#15181A', bucket: 'epargne' },
  { id: 'autre',       label: 'Autre',        emoji: '✦',  color: '#9AA0A6', bucket: 'envies' },
  { id: 'salaire',     label: 'Salaire',      emoji: '💼', color: '#1E8E5C', bucket: 'revenu', income: true },
  { id: 'bonus',       label: 'Bonus',        emoji: '✨', color: '#F2C035', bucket: 'revenu', income: true },
];

// Seed: a believable Swiss mid-30s budget for Mai 2026
const SEED_TX = [
  { id: 't1',  categoryId: 'salaire',     amount:  6850.00, description: 'Salaire Mai',          date: '2026-05-25', dateLabel: '25 mai' },
  { id: 't2',  categoryId: 'logement',    amount: -1980.00, description: 'Loyer · Lausanne',     date: '2026-05-01', dateLabel: '1 mai'  },
  { id: 't3',  categoryId: 'sante',       amount:  -412.50, description: 'Assurance maladie',    date: '2026-05-02', dateLabel: '2 mai'  },
  { id: 't4',  categoryId: 'alimentation',amount:  -127.40, description: 'Migros Flon',          date: '2026-05-18', dateLabel: '18 mai' },
  { id: 't5',  categoryId: 'transport',   amount:   -85.00, description: 'CFF · abonnement',     date: '2026-05-03', dateLabel: '3 mai'  },
  { id: 't6',  categoryId: 'restos',      amount:   -52.80, description: 'Café Romand',          date: '2026-05-15', dateLabel: '15 mai' },
  { id: 't7',  categoryId: 'loisirs',     amount:   -38.00, description: 'Pathé Flon',           date: '2026-05-12', dateLabel: '12 mai' },
  { id: 't8',  categoryId: 'alimentation',amount:   -94.20, description: 'Coop',                 date: '2026-05-10', dateLabel: '10 mai' },
  { id: 't9',  categoryId: 'epargne',     amount:  -600.00, description: 'Vers compte épargne',  date: '2026-05-26', dateLabel: '26 mai' },
  { id: 't10', categoryId: 'pilier3',     amount:  -588.00, description: '3e pilier A',          date: '2026-05-01', dateLabel: '1 mai'  },
  { id: 't11', categoryId: 'vetements',   amount:  -119.00, description: 'Globus',               date: '2026-05-08', dateLabel: '8 mai'  },
  { id: 't12', categoryId: 'restos',      amount:   -34.50, description: 'Take-away',            date: '2026-05-19', dateLabel: '19 mai' },
];

Object.assign(window, { CATEGORIES, SEED_TX });
