import ForgejoKit
import SwiftUI

extension DiffLineType {
    var color: Color {
        switch self {
        case .header: .blue
        case .addition: .green
        case .deletion: .red
        case .context: .primary
        }
    }

    var backgroundColor: Color {
        switch self {
        case .header: .blue.opacity(0.1)
        case .addition: .green.opacity(0.1)
        case .deletion: .red.opacity(0.1)
        case .context: .clear
        }
    }
}
