/// The anti-cheat layer. Chosen per commitment at creation time.
enum ProofType {
  /// Plain checkbox — for trivia only.
  Honour,

  /// Camera-only, no gallery import, timestamp + optional GPS embedded.
  Photo,

  /// Foreground session of >= X minutes; backgrounding pauses it.
  Timer,

  /// Geofence dwell via passive location.
  Location,

  /// Health platform confirms a workout occurred in the window.
  Health,

  /// An accountability partner taps to confirm.
  Witness,
}

String proofLabel(ProofType value) {
  switch (value) {
    case ProofType.Honour:
      return "Honour";
    case ProofType.Photo:
      return "Photo";
    case ProofType.Timer:
      return "Timer";
    case ProofType.Location:
      return "Location";
    case ProofType.Health:
      return "Health";
    case ProofType.Witness:
      return "Witness";
  }
}

ProofType getProofType(String? name) {
  for (ProofType value in ProofType.values) {
    if (value.name == name) {
      return value;
    }
  }
  return ProofType.Honour;
}
