import SwiftUI
import HealthDB
import HealthKitExtensions

struct OtherSamplesList: View {

    let database: HealthDatabase

    var body: some View {
        List {
            QuantitySampleRow<BloodAlcoholContent>(database: database)
            QuantitySampleRow<BloodGlucose>(database: database)
            CategoryEmptySampleRow<HandwashingEvent>(database: database)
            QuantitySampleRow<InhalerUsage>(database: database)
            QuantitySampleRow<InsulinDelivery>(database: database)
            QuantitySampleRow<NumberOfTimesFallen>(database: database, title: "Number of Times Fallen")
            CategoryEmptySampleRow<SexualActivity>(database: database)
            QuantitySampleRow<TimeInDaylight>(database: database)
            CategoryEmptySampleRow<ToothbrushingEvent>(database: database)
            QuantitySampleRow<UvExposure>(database: database, title: "UV Index")
            QuantitySampleRow<WaterTemperature>(database: database)
        }
        .navigationTitle("Other Data")
    }
}

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