38 lines
785 B
Swift
38 lines
785 B
Swift
//
|
||
// WorkoutStatus.swift
|
||
// Workouts
|
||
//
|
||
// Created by rzen on 7/16/25 at 7:03 PM.
|
||
//
|
||
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
|
||
//
|
||
|
||
import Foundation
|
||
|
||
enum WorkoutStatus: Int, Codable {
|
||
case notStarted = 1
|
||
case inProgress = 2
|
||
case completed = 3
|
||
case skipped = 4
|
||
|
||
static var unnamed = "Undetermined"
|
||
|
||
var name: String {
|
||
switch (self) {
|
||
case .notStarted: "Not Started"
|
||
case .inProgress: "In Progress"
|
||
case .completed: "Completed"
|
||
case .skipped: "Skipped"
|
||
}
|
||
}
|
||
|
||
var checkboxStatus: CheckboxStatus {
|
||
switch (self) {
|
||
case .notStarted: .unchecked
|
||
case .inProgress: .intermediate
|
||
case .completed: .checked
|
||
case .skipped: .cancelled
|
||
}
|
||
}
|
||
}
|