PumpManagerExtensions.swift 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import LoopKit
  2. import LoopKitUI
  3. extension PumpManager {
  4. var rawValue: [String: Any] {
  5. [
  6. "managerIdentifier": managerIdentifier, // "managerIdentifier": type(of: self).managerIdentifier,
  7. "state": rawState
  8. ]
  9. }
  10. }
  11. extension PumpManagerUI {
  12. // static func setupViewController() -> PumpManagerSetupViewController & UIViewController & CompletionNotifying {
  13. // setupViewController(
  14. // insulinTintColor: .accentColor,
  15. // guidanceColors: GuidanceColors(acceptable: .green, warning: .orange, critical: .red),
  16. // allowedInsulinTypes: [.apidra, .humalog, .novolog, .fiasp, .lyumjev]
  17. // )
  18. // }
  19. func settingsViewController(bluetoothProvider: BluetoothProvider) -> UIViewController & CompletionNotifying {
  20. settingsViewController(
  21. bluetoothProvider: bluetoothProvider,
  22. colorPalette: .default,
  23. allowDebugFeatures: false,
  24. allowedInsulinTypes: [.apidra, .humalog, .novolog, .fiasp, .lyumjev]
  25. )
  26. }
  27. // func settingsViewController() -> UIViewController & CompletionNotifying {
  28. // settingsViewController(
  29. // insulinTintColor: .accentColor,
  30. // guidanceColors: GuidanceColors(acceptable: .green, warning: .orange, critical: .red),
  31. // allowedInsulinTypes: [.apidra, .humalog, .novolog, .fiasp, .lyumjev]
  32. // )
  33. // }
  34. }
  35. protocol PumpSettingsBuilder {
  36. func settingsViewController() -> UIViewController & CompletionNotifying
  37. }