| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- // LoopFollow
- // FastDropAlarmEditor.swift
- import SwiftUI
- struct FastDropAlarmEditor: View {
- @Binding var alarm: Alarm
- @State private var useLimit: Bool = false
- var body: some View {
- Group {
- InfoBanner(
- text: String(localized: "Alerts when glucose readings drop rapidly. For example, three straight readings each falling by at least the amount you set. Optionally limit alerts to only fire below a certain BG level.")
- )
- AlarmGeneralSection(alarm: $alarm)
- AlarmBGSection(
- header: String(localized: "Rate of Fall"),
- footer: String(localized: "This is how much the glucose must drop to be considered a fast drop."),
- title: String(localized: "Falls by"),
- range: 3 ... 54,
- value: $alarm.delta
- )
- AlarmStepperSection(
- header: String(localized: "Consecutive Drops"),
- footer: String(localized: "Number of drops—each meeting the rate above—required before an alert fires."),
- title: String(localized: "Number of Drops"),
- range: 1 ... 3,
- step: 1,
- value: $alarm.monitoringWindow
- )
- AlarmBGLimitSection(
- header: String(localized: "BG Limit"),
- footer: String(localized: "When enabled, this alert only fires if the glucose is below the limit you set."),
- toggleText: String(localized: "Use BG Limit"),
- pickerTitle: String(localized: "Dropping below"),
- range: 40 ... 300,
- defaultOnValue: 120,
- value: $alarm.belowBG
- )
- AlarmActiveSection(alarm: $alarm)
- AlarmAudioSection(alarm: $alarm)
- AlarmSnoozeSection(alarm: $alarm)
- }
- }
- }
|