//
//  TaskSwitchingMenuView.swift
//  forShip
//
//  Created by Mamoru Sugita on 2023/10/18.
//

import SwiftUI

struct TaskSwitchingMenuView: View {
    
    @Binding var viewMode: TaskViewMode
    
    var list : [ECA] = [.America]
    
    var body: some View {
        VStack{
            //List
            
            TaskEcaView()
            //AddECAボタン
            Button(action: {
                viewMode = .EcaList
            }, label: {
                Text("Add ECA Task")
                    .padding()
            })
            .background(ColorSet.PrimaryActiveIcon.color)
            .cornerRadius(30)
            
            Spacer()
        }
        .padding()
    }
}

struct TaskEcaView: View {
    var body: some View {
        HStack {
            Circle()
                .frame(width: 10)
            
            Text("America ECA")
            
            Spacer()
            
            Button(action: {
                
            }, label: {
                /*@START_MENU_TOKEN@*/Text("Button")/*@END_MENU_TOKEN@*/
            })
        }
        .padding()
    }
}


#Preview {
    TaskSwitchingMenuView(viewMode: .constant(.SwitchingMenu))
}
