/// Progression rules that actually apply to bodyweight training, where adding
/// plates is not the lever.
enum ProgressionRule {
  /// 3x8 -> 3x12, then a harder variation.
  Reps,

  /// Incline push-up -> flat -> decline -> archer -> one-arm.
  Leverage,

  /// Slower tempo, longer holds, same reps.
  TimeUnderTension,

  /// Same work, less rest.
  Density,

  /// Added external load.
  Load,
}

String progressionLabel(ProgressionRule value) {
  switch (value) {
    case ProgressionRule.Reps:
      return "Rep progression";
    case ProgressionRule.Leverage:
      return "Leverage progression";
    case ProgressionRule.TimeUnderTension:
      return "Time under tension";
    case ProgressionRule.Density:
      return "Density";
    case ProgressionRule.Load:
      return "Load";
  }
}

ProgressionRule getProgressionRule(String? name) {
  for (ProgressionRule value in ProgressionRule.values) {
    if (value.name == name) {
      return value;
    }
  }
  return ProgressionRule.Reps;
}
