//
//  BoosterSubscriptionManagementScreen.swift
//
//
//  Created by Victor on 19/06/2024.
//

import SwiftUI

struct BoosterSubscriptionManagementScreen: View {

    @State var selectedValue = 0
    @State var presentControls = false
    
    var body: some View {
        ScrollView {
            VStack(alignment: .leading, spacing: 16) {
                BoosterActiveHeaderView()
                
                SQText("Mes boosters", size: 20, font: .bold)
                
                Picker("", selection: $selectedValue) {
                    SQText("À venir").tag(0)
                    SQText("Passées").tag(1)
                }
                .pickerStyle(.segmented)
            }
            .padding([.leading, .trailing])
            
            VStack(spacing: 16) {
                ForEach(0 ... 2, id: \.self) { _ in
                    BoosterHistoryCellView()
                        .onTapGesture {
                            withAnimation {
                                presentControls.toggle()
                            }
                        }
                }
            }
        }
//        .bottomSheet(isShowing: $presentControls, content: {
//            BoosterSubscriptionOptionsView()
//        })
    }
}

#Preview {
    BoosterSubscriptionManagementScreen()
}
