//
//  PromotionalScreenViewModel.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 15/10/2024.
//

import Foundation
import SwiftUI

class PromotionalScreenViewModel: ObservableObject {
    @Published var nextPromotionalScreen: ResiliationPromotionalScreen?

    init(nextPromotionalScreen: ResiliationPromotionalScreen? = nil) {
        self.nextPromotionalScreen = nextPromotionalScreen
    }

    @ViewBuilder
    func getPromotionalScreenNew(for screen: ResiliationPromotionalScreen) -> some View {
        switch screen {
        case .webinarPresentation:
            WebinaireScreen(viewModel: PromotionalScreenViewModel())
        case .profileCompletion:
            ProfileCompletionScreen(viewModel: PromotionalScreenViewModel())
        case .editPerimeter:
            ResizePerimeterScreen(viewModel: PromotionalScreenViewModel())
        case .onlyProSearches:
            OnlyProRequestsScreen(viewModel: PromotionalScreenViewModel())
        case .oneMonthBoosterOffered:
            BoosterSubscriptionSelectionScreen()
        case .allovoisinsPromotion:
            AlloVoisinReputationScreen(viewModel: PromotionalScreenViewModel())
        case .extendMyTrialPeriod:
            MoreTimeScreen(viewModel: PromotionalScreenViewModel())
        case .askPartProStatusChangeWithCancellation, .askPartProStatusChange:
            StatusChangeScreen(viewModel: PromotionalScreenViewModel())
        case .customerSupportForPro, .customerSupportForPart:
            PersonalizedSupportScreen(viewModel: PromotionalScreenViewModel())
        default:
            EmptyView()
        }
    }
}
