//
//  ChatTitleView.swift
//  Sailassist
//
//  Created by Mamoru Sugita on 2023/11/09.
//

import SwiftUI

struct ChatTitleView: View {
    @Binding var isShowMember: Bool
    var body: some View {
        
        VStack {
            
            HStack {
                Button{
                    
                }label: {
//                    Image("ink_02")
                }
                .disabled(true)
                .frame(width: 48, height: 48)
                
                Spacer()
                HStack(spacing: 8) {
                    VStack{
                        Text("JMB-Demo(0518)")
                            .font(FontStyle.TitleL.font)
                        Text("Yokoyama,Nogami,Arahira,Enokida")
                            .font(FontStyle.TitleSBold.font)
                        
                    }
                    .foregroundColor(ColorSet.Body.color)
                    .frame(width: 162,height: 44)
                    
                    
                    Button{
                        isShowMember.toggle()
                    }label: {
                        Image(systemName: isShowMember ? "chevron.down" : "chevron.up")
                            .resizable()
                            .scaledToFit()
                            .frame(width: 22.63, height: 12.73)
                            .foregroundColor(ColorSet.Body.color)
                        
                    }
                    .frame(width: 30, height: 30)
                }
                
                Spacer()

                Button{
                    
                }label: {
                    Image("chat_alert")
                        .resizable()
                        .scaledToFit()
                        .frame(width: 30, height: 30)
                }
                .frame(width: 48, height: 48)
            }
            .frame(height: 60)
            
            Divider()
                .background(ColorSet.LineColor04.color)
        }
    }
}

#Preview {
    ChatTitleView(isShowMember: .constant(false))
}
