GlucoseNotificationsOption.swift 832 B

12345678910111213141516171819202122232425262728
  1. //
  2. // GlucoseNotificationOption.swift
  3. // FreeAPS
  4. //
  5. // Created by Kimberlie Skandis on 1/18/25.
  6. //
  7. import Foundation
  8. import SwiftUI
  9. public enum GlucoseNotificationsOption: String, JSON, CaseIterable, Identifiable, Codable, Hashable {
  10. case disabled
  11. case alwaysEveryCGM
  12. case onlyAlarmLimits
  13. public var id: String { rawValue }
  14. var displayName: String {
  15. switch self {
  16. case .disabled:
  17. return String(localized: "Disabled", comment: "Option to disable glucose notifications")
  18. case .alwaysEveryCGM:
  19. return String(localized: "Always", comment: "Option to always notify on every CGM reading")
  20. case .onlyAlarmLimits:
  21. return String(localized: "Only Alarm Limits", comment: "Option to notify only when glucose reaches alarm limits")
  22. }
  23. }
  24. }