const Definitions = {
  none: { incomeMultiplier: 1.0, weight: 0 },
  golden: { incomeMultiplier: 1.5, weight: 50 },
  crystal: { incomeMultiplier: 1.8, weight: 30 },
  void: { incomeMultiplier: 2.2, weight: 20 },
};

/**
 * @returns {Array<{ id: string, weight: number }>}
 */
export function getMutationEntries() {
  const entries = [];
  for (const [id, def] of Object.entries(Definitions)) {
    if (id !== "none") entries.push({ id, weight: def.weight });
  }
  return entries;
}

/**
 * @param {string} mutationId
 * @returns {number}
 */
export function getIncomeMultiplier(mutationId) {
  const def = Definitions[mutationId];
  if (def === null || def === undefined) return 1.0;
  return def.incomeMultiplier;
}
