//
//  MainView.swift
//  AcaMate
//
//  Created by TAnine on 2/4/25.
//

import SwiftUI
import Combine

struct MainView: View {
    @EnvironmentObject var appVM: AppViewModel
    @EnvironmentObject var alertController: AlertController
    @State var cancellables: Set<AnyCancellable> = []
    @Binding var naviState : NaviState
    
    var body: some View {
        
        VStack(spacing: 0) {
            Group {
                switch appVM.menuName {
                case .Home:
                    HomeView()
                case .Management:
                    ManagementView()
                case .Chatting:
                    ChattingView()
                case .Calendar:
                    CalendarView()
                case .Etc:
                    EtcView()
                }
            }
            Spacer(minLength: 1)
            
            BottomView()
                .frame(maxWidth: .infinity)
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)

    }
}


