import SwiftUI
import HealthDB
import HealthKitExtensions

struct VitalsList: View {

    let database: HealthDatabase

    var body: some View {
        List {
            QuantitySampleRow<BloodGlucose>(database: database)
            QuantitySampleRow<OxygenSaturation>(database: database, title: "Blood Oxygen")
            Text("Blood Pressure")
                .foregroundStyle(.secondary)
            QuantitySampleRow<BodyTemperature>(database: database)
            QuantitySampleRow<HeartRate>(database: database)
            CategoryEnumSampleRow<MenstrualFlow>(database: database)
            QuantitySampleRow<RespiratoryRate>(database: database)

        }
        .navigationTitle("Vitals")
    }
}

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