import SwiftUI
import HealthDB
import HealthKitExtensions

struct ActivitySamplesList: View {

    let database: HealthDatabase

    var body: some View {
        List {
            QuantitySampleRow<ActiveEnergyBurned>(database: database)
            QuantitySampleRow<AppleExerciseTime>(database: database)
            QuantitySampleRow<AppleMoveTime>(database: database)
            QuantitySampleRow<AppleStandTime>(database: database)
            QuantitySampleRow<BasalEnergyBurned>(database: database)
            QuantitySampleRow<CyclingCadence>(database: database)
            QuantitySampleRow<CyclingFunctionalThresholdPower>(database: database)
            QuantitySampleRow<CyclingPower>(database: database)
            QuantitySampleRow<CyclingSpeed>(database: database)
            QuantitySampleRow<DistanceCycling>(database: database)
            QuantitySampleRow<DistanceDownhillSnowSports>(database: database)
            QuantitySampleRow<FlightsClimbed>(database: database)
            QuantitySampleRow<NikeFuel>(database: database)
            QuantitySampleRow<PhysicalEffort>(database: database)
            QuantitySampleRow<PushCount>(database: database)
            QuantitySampleRow<RunningPower>(database: database)
            QuantitySampleRow<RunningSpeed>(database: database)
            QuantitySampleRow<StepCount>(database: database)
            QuantitySampleRow<DistanceSwimming>(database: database)
            QuantitySampleRow<SwimmingStrokeCount>(database: database)
            QuantitySampleRow<UnderwaterDepth>(database: database)
            QuantitySampleRow<DistanceWalkingRunning>(database: database)
            QuantitySampleRow<DistanceWheelchair>(database: database)

        }
        .navigationTitle("Activity")
    }
}

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