//
//  LoginTypeSelectView.swift
//  forShip
//
//  Created by Mamoru Sugita on 2023/10/13.
//

import SwiftUI

struct LoginTypeSelectView: View{
    @Binding var isQrRead: Bool
    @Binding var viewMode: LoginViewMode
    
    var body: some View{
        VStack {
            HStack {
                Button(action: {
                    isQrRead = true
                }, label: {
                    Text("Read the QR code")
                        .frame(maxWidth: .infinity)
                        .frame(height: 50)
                        .foregroundColor(ColorSet.ButtonText.color)
                        .background(ColorSet.PrimaryActiveIcon.color)
                })
            }
            .padding(.horizontal, 32)
            Button(action: {
                print("change mode")
                viewMode = .InputIdPassword
            }, label: {
                Text("Enter Ship ID / Password")
                    .underline()
                    .font(FontStyle.SupplementText.font)
                    .foregroundColor(ColorSet.ToggleBackGround.color)
            })
        }
    }
}
#Preview {
    LoginTypeSelectView(isQrRead: .constant(false), viewMode: .constant(.SelectType))
}
