import Foundation

/// Completion state of a workout or an individual exercise log. Persisted as its
/// raw string in both the JSON documents and the SwiftData cache.
enum WorkoutStatus: String, CaseIterable, Codable, Sendable {
    case notStarted
    case inProgress
    case completed
    case skipped

    var displayName: String {
        switch self {
        case .notStarted: "Not Started"
        case .inProgress: "In Progress"
        case .completed: "Completed"
        case .skipped: "Skipped"
        }
    }

    var name: String { displayName }
}

/// How an exercise's effort is measured. Persisted as its raw `Int` value.
enum LoadType: Int, CaseIterable, Codable, Sendable {
    case none = 0
    case weight = 1
    case duration = 2

    var name: String {
        switch self {
        case .none: "None"
        case .weight: "Weight"
        case .duration: "Duration"
        }
    }
}
