import SwiftUI
import HealthDB
import HealthKitExtensions

struct RespiratorySamplesList: View {

    let database: HealthDatabase

    var body: some View {
        List {
            QuantitySampleRow<OxygenSaturation>(database: database, title: "Blood Oxygen")
            QuantitySampleRow<Vo2Max>(database: database, title: "Cardio Fitness")
            QuantitySampleRow<ForcedExpiratoryVolume1>(database: database, title: "Forced Expiratory Volume, 1 sec")
            QuantitySampleRow<ForcedVitalCapacity>(database: database)
            QuantitySampleRow<InhalerUsage>(database: database)
            QuantitySampleRow<PeakExpiratoryFlowRate>(database: database)
            QuantitySampleRow<RespiratoryRate>(database: database)
            QuantitySampleRow<SixMinuteWalkTestDistance>(database: database, title: "Six Minute Walk Distance")
        }
        .navigationTitle("Respiratory")
    }
}

#Preview {
    NavigationStack {
        RespiratorySamplesList(database: .empty)
    }
}
