import SwiftUI

// MARK: - Task Category Colors

extension Color {
    /// Returns the semantic color for a given task category name.
    /// Shared across all views that display category-colored elements.
    static func taskCategoryColor(for categoryName: String) -> Color {
        switch categoryName.lowercased() {
        case "plumbing": return Color.appSecondary
        case "safety", "electrical": return Color.appError
        case "hvac": return Color.appPrimary
        case "appliances": return Color.appAccent
        case "exterior", "lawn & garden": return Color(hex: "#34C759") ?? .green
        case "interior": return Color(hex: "#AF52DE") ?? .purple
        case "general", "seasonal": return Color(hex: "#FF9500") ?? .orange
        default: return Color.appPrimary
        }
    }
}
