LatestHRV.swift
961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// LatestHRV.swift
// hippo-watch Watch App
//
// Created by shihao on 2025/7/8.
//
import Foundation
import SwiftUI
struct LatestHRV: Codable {
var userHrv: Double?
var userHrvBaseline: Double?
var pairUserHrv: Double?
var pairHrvBaseline: Double?
}
extension HRVStatus {
var watchStatusColors: [Color] {
switch self {
case .fullOfEnergy:
return [.init(hex: "#FF6EA271"),
.black]
case .normal:
return [.init(hex: "#FF796EA2"),
.black]
case .overpressure:
return [.init(hex: "#FF924343"),
.black]
}
}
var watchStatusTextColor: Color {
switch self {
case .fullOfEnergy:
return .init(hex: "#FF95FF9B")
case .normal:
return .init(hex: "#FFE2BBFF")
case .overpressure:
return .init(hex: "#FFFF8E8E")
}
}
}