//
//  ParametersMenuView.swift
//  ArkitDoushiQi
//
//  Created by Johan LACHENAL on 21/05/2024.
//

import SwiftUI

enum Language: String, CaseIterable, Identifiable, Hashable {
    case French = "Français"
    case English = "English"
    var id: String { self.rawValue }
}

struct GeneralParametersMenuView: View {
    @State private var selectedAIOption: AIT = .RandomAction
    @State private var selectedLanguageOption: Language = .French
    @State private var selectedRulesOption: Rules = .Regular
    var body: some View {
        VStack(alignment: .leading) {
            HStack(alignment: .center) {
                Text("Paramètres").bold().font(.title)
            }.frame(maxWidth: .infinity)
            Spacer().frame(maxHeight: 30)
            ToggleComponent(description: "Dark mode", booleanName: "darkModeEnabled", booleanDefaultValue: false)
            PickerComponent(title: "Sélectionne un langage :",
                           selectedOption: $selectedLanguageOption,
                           options: Language.allCases)
            
        }.frame(maxHeight: .infinity, alignment: .top)
    }
}

struct GeneralParametersMenuView_Previews: PreviewProvider {
    static var previews: some View {
        GeneralParametersMenuView()
    }
}
