MockCGMManager+UI.swift 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // MockCGMManager+UI.swift
  3. // LoopKitUI
  4. //
  5. // Created by Michael Pangburn on 11/23/18.
  6. // Copyright © 2018 LoopKit Authors. All rights reserved.
  7. //
  8. import UIKit
  9. import SwiftUI
  10. import HealthKit
  11. import LoopKit
  12. import LoopKitUI
  13. import MockKit
  14. extension MockCGMManager: CGMManagerUI {
  15. public var smallImage: UIImage? { return UIImage(named: "CGM Simulator", in: Bundle(for: MockCGMManagerSettingsViewController.self), compatibleWith: nil) }
  16. public static func setupViewController(glucoseTintColor: Color, guidanceColors: GuidanceColors) -> (UIViewController & CGMManagerSetupViewController & CompletionNotifying)? {
  17. return nil
  18. }
  19. public func settingsViewController(for glucoseUnit: HKUnit, glucoseTintColor: Color, guidanceColors: GuidanceColors) -> (UIViewController & CompletionNotifying) {
  20. let settings = MockCGMManagerSettingsViewController(cgmManager: self, glucoseUnit: glucoseUnit)
  21. let nav = SettingsNavigationViewController(rootViewController: settings)
  22. return nav
  23. }
  24. public var cgmStatusHighlight: DeviceStatusHighlight? {
  25. return self.mockSensorState.cgmStatusHighlight
  26. }
  27. // TODO Placeholder. This functionality will come with LOOP-1293
  28. public var cgmLifecycleProgress: DeviceLifecycleProgress? {
  29. return self.mockSensorState.cgmLifecycleProgress
  30. }
  31. }