//
// CheckboxStatus.swift
// Workouts
//
// Created by rzen on 7/20/25 at 11:07 AM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//

import SwiftUI

enum CheckboxStatus {
    case checked
    case unchecked
    case intermediate
    case cancelled

    var color: Color {
        switch self {
        case .checked: .accentColor
        case .unchecked: .gray
        case .intermediate: .accentColor
        case .cancelled: .gray
        }
    }

    var systemName: String {
        switch self {
        case .checked: "checkmark.circle.fill"
        case .unchecked: "circle"
        case .intermediate: "ellipsis.circle"
        case .cancelled: "wrongwaysign"
        }
    }
}

// MARK: - WorkoutStatus Extension

extension WorkoutStatus {
    var checkboxStatus: CheckboxStatus {
        switch self {
        case .notStarted: .unchecked
        case .inProgress: .intermediate
        case .completed: .checked
        case .skipped: .cancelled
        }
    }
}
