InfoType.swift 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // LoopFollow
  2. // InfoType.swift
  3. import Foundation
  4. enum InfoType: Int, CaseIterable {
  5. case iob, cob, basal, override, battery, pump, pumpBattery, sage, cage, recBolus, minMax, carbsToday, autosens, profile, target, isf, carbRatio, updated, tdd, iage
  6. var name: String {
  7. switch self {
  8. case .iob: return String(localized: "IOB")
  9. case .cob: return String(localized: "COB")
  10. case .basal: return String(localized: "Basal")
  11. case .override: return String(localized: "Override")
  12. case .battery: return String(localized: "Battery")
  13. case .pump: return String(localized: "Pump")
  14. case .pumpBattery: return String(localized: "Pump Battery")
  15. case .sage: return String(localized: "SAGE")
  16. case .cage: return String(localized: "CAGE")
  17. case .recBolus: return String(localized: "Rec. Bolus")
  18. case .minMax: return String(localized: "Min/Max")
  19. case .carbsToday: return String(localized: "Carbs today")
  20. case .autosens: return String(localized: "Autosens")
  21. case .profile: return String(localized: "Profile")
  22. case .target: return String(localized: "Target")
  23. case .isf: return String(localized: "ISF")
  24. case .carbRatio: return String(localized: "CR")
  25. case .updated: return String(localized: "Updated")
  26. case .tdd: return String(localized: "TDD")
  27. case .iage: return String(localized: "IAGE")
  28. }
  29. }
  30. var defaultVisible: Bool {
  31. switch self {
  32. case .iob, .cob, .basal, .override, .battery, .pump, .sage, .cage, .recBolus, .minMax, .carbsToday:
  33. return true
  34. default:
  35. return false
  36. }
  37. }
  38. var sortOrder: Int {
  39. return rawValue
  40. }
  41. }