// LoopFollow
// PumpVolumeAlarmEditor.swift

import SwiftUI

struct PumpVolumeAlarmEditor: View {
    @Binding var alarm: Alarm

    var body: some View {
        Group {
            InfoBanner(
                text: String(localized: "This warns you when the insulin pump is running low on insulin."),
                alarmType: alarm.type
            )

            AlarmGeneralSection(alarm: $alarm)

            AlarmStepperSection(
                header: String(localized: "Trigger Level"),
                footer: String(localized: "An alert fires once the reservoir is at this value or lower."),
                title: String(localized: "Reservoir Below"),
                range: 1 ... 50,
                step: 1,
                unitLabel: String(localized: "Units"),
                value: $alarm.threshold
            )

            AlarmActiveSection(alarm: $alarm)
            AlarmAudioSection(alarm: $alarm)
            AlarmSnoozeSection(alarm: $alarm)
        }
    }
}
