//
//  URLs.swift
//  PadelClub
//
//  Created by Laurent Morvillier on 22/04/2024.
//

import Foundation

enum URLs: String, Identifiable {
    case subscriptions = "https://apple.co/2Th4vqI"
    case main = "https://xlr.alwaysdata.net/"
    case api = "https://xlr.alwaysdata.net/roads/"
    case beachPadel = "https://beach-padel.app.fft.fr/beachja/index/"
    //case padelClub = "https://padelclub.app"
    case padelRules = "https://fft-site.cdn.prismic.io/fft-site/ZgLn3McYqOFdyF7n_LEGUIDEDELACOMPETITIONDEPADEL-MAJDECEMBRE2023.pdf"
    
    var id: String { return self.rawValue }
    
    var url: URL {
        return URL(string: self.rawValue)!
    }
    
}

enum PageLink: String, Identifiable, CaseIterable {
    case teams = "Équipes"
    case summons = "Convocations"
    case groupStages = "Poules"
    case matches = "Matchs"
    case rankings = "Classement"
    case broadcast = "Mode TV (Tournoi)"
    case clubBroadcast = "Mode TV (Club)"
    
    var id: String { self.rawValue }
    
    func localizedLabel() -> String {
        rawValue
    }
    
    var path: String {
        switch self {
        case .matches:
            return ""
        case .teams:
            return "teams"
        case .summons:
            return "summons"
        case .rankings:
            return "rankings"
        case .groupStages:
            return "group-stages"
        case .broadcast:
            return "broadcast"
        case .clubBroadcast:
            return ""
        }
    }
}

