Status.swift 693 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Status.swift
  3. // Todos
  4. //
  5. // Created by Sam Jaffe on 3/5/26.
  6. //
  7. import Foundation
  8. enum Status: String, CaseIterable, Identifiable, Codable {
  9. case Todo = " "
  10. case Complete = "V"
  11. case InProgress = "C"
  12. case Hiatus = "H"
  13. case Waiting = "R"
  14. var id: Self { self }
  15. var description: String { self.rawValue }
  16. var isStrong: Bool {
  17. self == .Complete || self == .Hiatus || self == .Waiting
  18. }
  19. var label: String {
  20. switch self {
  21. case .Todo: return "square.and.pencil"
  22. case .Complete: return "checkmark"
  23. case .InProgress: return "ellipsis.circle"
  24. case .Hiatus: return "clock.badge.questionmark"
  25. case .Waiting: return "airplane.circle"
  26. }
  27. }
  28. }