import Foundation
import HealthDB
import HealthKitExtensions
import HealthKit

extension Metadata {

    static let mock1: [String : Any] = [
        HKMetadataKeyIndoorWorkout : NSNumber(0.0),
        HKMetadataKeyElevationAscended : HKQuantity(unit: .meterUnit(with: .centi), doubleValue: 100564.0),
        HKMetadataKeyTimeZone : "Europe/Berlin",
        HKMetadataKeyWeatherHumidity : HKQuantity(unit: .percent(), doubleValue: 84.0),
        HKMetadataKeyWeatherTemperature : HKQuantity(unit: .degreeCelsius(), doubleValue: 20.8219999999961),
        HKMetadataKeyAverageMETs : HKQuantity(unit: .init(from: "kcal/hr*kg"), doubleValue: 4.12470993502559),
        "_HKPrivateWeatherCondition" : NSNumber(4.0),
        "_HKPrivateWorkoutActivityMoveMode" : NSNumber(1.0),
        "_HKPrivateWorkoutMaxGroundElevation" : HKQuantity(unit: .meter(), doubleValue: 3188.78609748806),
        "_HKPrivateWorkoutWeatherSourceName" : "Apple Weather",
        "_HKPrivateWorkoutHeartRateZones" : Data(hex: "62706c6973743030a5010a121a22d402030405060708095f1012636f6e66696775726174696f6e436f756e745f10116c6f776572446973706c6179426f756e645f10117570706572446973706c6179426f756e645f1012636f6e66696775726174696f6e496e64657810052300000000000000002340604000000000001000d40b0c0d0e060f10115f1012636f6e66696775726174696f6e436f756e745f10116c6f776572446973706c6179426f756e645f10117570706572446973706c6179426f756e645f1012636f6e66696775726174696f6e496e6465782340604000000000002340620000000000001001d413141516061718195f1012636f6e66696775726174696f6e436f756e745f10116c6f776572446973706c6179426f756e645f10117570706572446973706c6179426f756e645f1012636f6e66696775726174696f6e496e646578234062000000000000234063c000000000001002d41b1c1d1e061f20215f1012636f6e66696775726174696f6e436f756e745f10116c6f776572446973706c6179426f756e645f10117570706572446973706c6179426f756e645f1012636f6e66696775726174696f6e496e646578234063c000000000002340658000000000001003d423242526062728295f1012636f6e66696775726174696f6e436f756e745f10116c6f776572446973706c6179426f756e645f10117570706572446973706c6179426f756e645f1012636f6e66696775726174696f6e496e64657823406580000000000023406740000000000010040008000e0017002c004000540069006b0074007d007f0088009d00b100c500da00e300ec00ee00f7010c0120013401490152015b015d0166017b018f01a301b801c101ca01cc01d501ea01fe02120227023002390000000000000201000000000000002a0000000000000000000000000000023b")!,
        "_HKPrivateWorkoutMinHeartRate" : HKQuantity(unit: .count().unitDivided(by: .second()), doubleValue: 1.05),
        "_HKPrivateMetadataKeyMetricPlatterStatistics" : """
{"currentMetricPlatterType":"standard","currentMetricPlatterElapsedTime":17991.661971926689,"metricPlatterAccumulatedTime":{"standard":5039.4511208534241,"activityRings":31.905926942825317,"elevation":12920.30492413044}}
""",
        "_HKPrivateWorkoutWasInDaytime" : NSNumber(1.0),
        "_HKPrivateWorkoutWeatherLocationCoordinatesLatitude" : NSNumber(47.0850386887433),
        "_HKPrivateWorkoutMinGroundElevation" : HKQuantity(unit: .meter(), doubleValue: 2147.15929389872),
        "_HKPrivateWorkoutConfiguration" : """
{"strings":{},"type":2,"data":"eyJ0eXBlIjoxLCJnb2FsIjoiWW5Cc2FYTjBNRERVQVFJREJBVXNMUzVZSkc5aWFtVmpkSE5ZSkhabGNuTnBiMjVaSkdGeVkyaHBkbVZ5VkNSMGIzQ29CZ2NRRmhvYkpDaFZKRzUxYkd6VUNBa0tDd3dORGc5ZkVCMU9URk5sYzNOcGIyNUJZM1JwZG1sMGVVZHZZV3hSZFdGdWRHbDBlVjhRSjA1TVUyVnpjMmx2YmtGamRHbDJhWFI1UjI5aGJFZHZZV3hVZVhCbFNXUmxiblJwWm1sbGNsWWtZMnhoYzNOZkVCcE9URk5sYzNOcGIyNUJZM1JwZG1sMGVVZHZZV3hXWVd4MVpZQUNFQUtBQnlOQTAxWUFBQUFBQU5NUkVnb1RGQlZZVm1Gc2RXVkxaWGxYVlc1cGRFdGxlU05BMDFZQUFBQUFBSUFEZ0FiU0NoY1lHVjhRRDBoTFZXNXBkRk4wY21sdVowdGxlWUFGZ0FSUmM5SWNIUjRqV0NSamJHRnpjMlZ6V2lSamJHRnpjMjVoYldXa0h5Q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FdWMFlXUmhkR0ZmRUNkR1NWVkpWMjl5YTI5MWRFRmpkR2wyYVhSNVZIbHdaVkJoY25SUFprMTFiSFJwYzNCdmNuUldKR05zWVhOelh4QWhSa2xWU1ZkdmNtdHZkWFJCWTNScGRtbDBlVlI1Y0dWSlpHVnVkR2xtYVdWeVh4QW9Ua3hUWlhOemFXOXVRWFY0YVd4cFlYSjVRV04wYVhacGRIbFVlWEJsU1dSbGJuUnBabWxsY2dpQUFnaUFCQkFZRUFEVEZRc1dGeGdaV2s1VExtOWlhbVZqZEhOWFRsTXVhMlY1YzZDQUE2RFNHeHdkSGxna1kyeGhjM05sYzFva1kyeGhjM051WVcxbG9oNGZYRTVUUkdsamRHbHZibUZ5ZVZoT1UwOWlhbVZqZE5JYkhDRWpvaUlmWHhBWFJrbFZTVmR2Y210dmRYUkJZM1JwZG1sMGVWUjVjR1ZmRUJkR1NWVkpWMjl5YTI5MWRFRmpkR2wyYVhSNVZIbHdaUklBQVlhZ1h4QVBUbE5MWlhsbFpFRnlZMmhwZG1WeTBTY29WSEp2YjNTQUFRQUlBQkVBR2dBakFDMEFNZ0E0QUQ0QVN3QnRBSThBdVFEQUFPUUJEd0VRQVJJQkV3RVZBUmNCR1FFZ0FTc0JNd0UwQVRZQk53RThBVVVCVUFGVEFXQUJhUUZ1QVhFQml3R2xBYW9CdkFHXC9BY1FBQUFBQUFBQUNBUUFBQUFBQUFBQXBBQUFBQUFBQUFBQUFBQUFBQUFBQnhnPT0ifQ==","objectModificationDate":702107514.08573401,"version":1,"numbers":{"configuration_type":1,"goal_type":2},"uuid":"41A03BAB-9C29-48F0-BE6D-1E8BCDFB25D9","objectState":0}
""".data(using: .utf8)!,
        "_HKPrivateWorkoutWeatherLocationCoordinatesLongitude" : NSNumber(11.1684857327149),
        "_HKPrivateWorkoutHeartRateZonesConfigurationType" : NSNumber(0.0),
        "_HKPrivateWorkoutAverageHeartRate" : HKQuantity(unit: .count().unitDivided(by: .second()), doubleValue: 1.83192725788713),
        "_HKPrivateWorkoutExtendedMode" : NSNumber(0.0),
        "_HKPrivateWorkoutMaxHeartRate" : HKQuantity(unit: .count().unitDivided(by: .second()), doubleValue: 2.58333333333333),
        "_HKPrivateWorkoutElapsedTimeInHeartRateZones" : Data(hex: "62706c6973743030d30102030405065131513251302340ad88000014000023407c37d7626000002340d637c27a270000080f1113151e270000000000000101000000000000000700000000000000000000000000000030")!
    ]
}
