//
//  ContinueAsParticularScreen.swift
//  Sequoia
//
//  Created by Victor on 09/10/2024.
//

import SwiftUI

struct ContinueAsParticularScreen: View {
    @ObservedObject var viewModel: PromotionalScreenViewModel
    @State private var navigateToNext = false

    var body: some View {
        VStack(spacing: 32) {
            SQText("Souhaitez-vous poursuivre en tant que particulier ?")
                .sqSize(18)
                .sqFont(.bold)
                .multilineTextAlignment(.center)
            SQText("Continuez de proposer vos services en tant que particulier pour arrondir vos fins de mois. À partir de 9,99 € / mois (sans engagement).")
                .sqFont(.semiBold)
                .multilineTextAlignment(.center)
            VStack {
                SQButton("Changer de statut") {
                    navigateToNext = true
                }
                SQButton("J’ai compris, mais je souhaite résilier")
                {
                    navigateToNext = true
                }
                .sqButtonType(.glass)
            }
        }
        .navigationDestination(isPresented: $navigateToNext) {
            if let screen = viewModel.nextPromotionalScreen {
                viewModel.getPromotionalScreenNew(for: screen)
            } else {
                ResiliationConfirmationScreen()
            }
        }
        .sqNavigationBar(title: "Ne partez pas !")
        .padding(16)
    }
}

#Preview {
    ContinueAsParticularScreen(viewModel: PromotionalScreenViewModel())
}
