//
//  MainMenu.swift
//  ArkitDoushiQi
//
//  Created by Johan LACHENAL on 16/05/2024.
//

import SwiftUI

struct MainMenu: View {
    @State private var action: Int? = 0
    @AppStorage("isDarkMode") private var isDarkMode = false
    var body: some View {
        VStack {
            NavigationView {
                VStack(alignment: .trailing) {
                    HStack(alignment: .top) {
                        Text("DouShiQi").frame(maxHeight: .infinity)
                            .bold()
                            .font(.title)
                    }.frame(maxWidth: .infinity,maxHeight: .infinity)
                    Spacer().frame(maxWidth: .infinity,maxHeight: .infinity)
                    Spacer().frame(height: 40)
                    MainMenuButton(title: "jouer")
                    { Text("jeu page") }
                    MainMenuButton(title: "parties enregistrées")
                    { Text("parties enregistrées page") }
                    MainMenuButton(title: "paramètres")
                    { ParametersMenuView() }
                    Spacer()
                }
                .fixedSize(horizontal: false, vertical: true)
                .padding(EdgeInsets(top: 10, leading: 32, bottom: 10, trailing: 32))
                .frame(maxWidth: .infinity,maxHeight: .infinity)
            }.frame(maxWidth: .infinity,maxHeight: .infinity)
        }.frame(maxWidth: .infinity,maxHeight: .infinity)
    }
}

struct MainMenu_Previews: PreviewProvider {
    static var previews: some View {
        MainMenu()
    }
}
