//
//  TournamentDurationManagerView.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 22/03/2024.
//

import SwiftUI

struct TournamentDurationManagerView: View {
    @Environment(Tournament.self) private var tournament: Tournament

    var body: some View {
        @Bindable var tournament = tournament
        LabeledContent {
            StepperView(count: $tournament.dayDuration, minimum: 1)
        } label: {
            Text("Durée")
            Text("\(tournament.dayDuration) jour" + tournament.dayDuration.pluralSuffix)
        }
    }
}

//#Preview {
//    TournamentDurationManagerView()
//        .environment(Tournament.mock())
//}
