//
//  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("QRを読み込む")
                        .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("Ship ID/Passwordを入力")
                    .underline()
                    .font(FontStyle.SupplementText.font)
                    .foregroundColor(ColorSet.ToggleBackGround.color)
            })
        }
    }
}
#Preview {
    LoginTypeSelectView(isQrRead: .constant(false), viewMode: .constant(.SelectType))
}
