//
//  TournamentBroadcastRowView.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 05/06/2024.
//

import SwiftUI
import LeStorage

struct TournamentBroadcastRowView: View {
    var tournament: Tournament

    var body: some View {
        NavigationLink(value: Screen.broadcast) {
            LabeledContent {
                if Store.main.userId == nil {
                    Image(systemName: "exclamationmark.circle.fill")
                        .foregroundStyle(.master)
                } else {
                    if tournament.isPrivate {
                        Text("tournoi privé").foregroundStyle(.logoRed)
                    } else {
                        Text("Automatique")
                    }
                }
            } label: {
                Text("Publication")
                if Store.main.userId == nil {
                    Text("Créez un compte pour publier !")
                }
            }
        }
    }
}
