//
//  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 (spacing: 20) {
            Button(action: {
                isQrRead = true
            }, label: {
                Text("Read the QR code")
                    .font(FontStyle.TitleS.font)
                    .frame(maxWidth: .infinity)
                    .frame(height: 60)
                    .foregroundColor(ColorSet.ButtonText.color)
                    .background(ColorSet.LoginBk01.color)
            })
            
            Button(action: {
                print("change mode")
                viewMode = .InputIdPassword
            }, label: {
                Text("Enter Ship ID / Password")
                    .underline()
                    .font(FontStyle.SupplementText.font)
                    .foregroundColor(ColorSet.Body.color)
            })
        }
        .padding(.horizontal, 50)

    }
}
#Preview {
    LoginTypeSelectView(isQrRead: .constant(false), viewMode: .constant(.SelectType))
}
