//
//  ResiliationNavigationView.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 14/10/2024.
//

// import SwiftUI
//
// struct ResiliationProcess: View {
//    @StateObject var viewModel = ResiliationViewModel(resiliationType: .apPart)
//    @StateObject var coordinator: ResiliationNavigationCoordinator
//
//    init() {
//        let vm = ResiliationViewModel(resiliationType: .apPart)
//        self._viewModel = StateObject(wrappedValue: vm)
//        self._coordinator = StateObject(wrappedValue: ResiliationNavigationCoordinator(viewModel: vm))
//    }
//
//    var body: some View {
//        ResiliationNavigationView(coordinator: coordinator, viewModel: viewModel)
//            .onAppear {
//                coordinator.start()
//            }
//    }
// }
//
// #Preview {
//    ResiliationProcess()
// }

import SwiftUI

struct ResiliationNavigationView: View {
    @StateObject private var viewModel: ResiliationViewModel

    init(resiliationType: ResiliationType) {
        self._viewModel = StateObject(wrappedValue: ResiliationViewModel(resiliationType: resiliationType))
    }

    var body: some View {
        NavigationStack {
            ResiliationCheckStepsScreen(viewModel: viewModel)
                .navigationBarTitle("Résiliation", displayMode: .inline)
        }
    }
}
