enum DataVersion {
  /// V1.0 Retail (VSWAP.WL6)
  version10Retail('a6d901dfb455dfac96db5e4705837cdb'),

  /// v1.1 Retail (VSWAP.WL6)
  version11Retail('a80904e0283a921d88d977b56c279b9d'),

  /// v1.4 Shareware (VSWAP.WL1)
  version14Shareware('6efa079414b817c97db779cecfb081c9'),

  /// v1.4 Retail (VSWAP.WL6) - GOG/Steam version
  version14Retail('b8ff4997461bafa5ef2a94c11f9de001'),

  unknown('unknown'),
  ;

  final String checksum;

  const DataVersion(this.checksum);

  static DataVersion fromChecksum(String hash) {
    return DataVersion.values.firstWhere(
      (v) => v.checksum == hash,
      orElse: () => DataVersion.unknown,
    );
  }
}
