//
//  MatchSpot.swift
//  PadelClub
//
//  Created by razmig on 22/03/2025.
//


struct MatchSpot: SpinDrawable {
    let match: Match
    let teamPosition: TeamPosition
    
    func segmentLabel(_ displayStyle: DisplayStyle, hideNames: Bool) -> [String] {
        [match.roundTitle(), matchTitle(displayStyle: displayStyle)].compactMap { $0 }
    }
    
    func matchTitle(displayStyle: DisplayStyle) -> String {
        [match.matchTitle(displayStyle), teamPositionLabel()].joined(separator: " - ")
    }
    
    func teamPositionLabel() -> String {
        switch teamPosition {
        case .one:
            return "haut"
        case .two:
            return "bas"
        }
    }
}
