//
//  MenuContentView.swift
//  forShip
//
//  Created by Mamoru Sugita on 2023/10/17.
//

import SwiftUI

struct MenuContentView: View {
    var content: MenuPath
    var body: some View {
        VStack(spacing: 0){
            HStack {
                Text(content.title)
                    .font(FontStyle.EmphasisText.font)
                    .foregroundColor(getFontColor())

                Spacer()
                
                if content.title != "Sign Out" {
                    Image("ink_01")
                        .resizable()
                        .frame(width: 22, height: 22)
                }
            }
            .padding(.vertical, 17)
            .padding(.horizontal, 30)
            
            Divider()
                .background(ColorSet.LineColor04.color)
        }
    }

    /**
     * Manual
     */
    func getFontColor() -> Color {
        var fontColor = ColorSet.Body.color
        if content == .Manual {
            if !SharingData.my.isManual {
                fontColor = ColorSet.BodyDescriptiion.color
            }
        }
        return fontColor
    }
}

#Preview {
    MenuContentView(content: .Manual)
}
