HbA1cDisplayUnit.swift 410 B

1234567891011121314151617
  1. import Foundation
  2. enum HbA1cDisplayUnit: String, JSON, CaseIterable, Identifiable, Codable, Hashable {
  3. var id: String { rawValue }
  4. case percent
  5. case mmolMol
  6. var displayName: String {
  7. switch self {
  8. case .percent:
  9. return NSLocalizedString("Percent", comment: "")
  10. case .mmolMol:
  11. return NSLocalizedString("mmol/mol", comment: "")
  12. }
  13. }
  14. }