//
//  ProfileReportDialogView.swift
//  SodaLive
//
//  Created by klaus on 2023/08/11.
//

import SwiftUI

struct ProfileReportDialogView: View {
    
    @Binding var isShowing: Bool
    let confirmAction: () -> Void
    
    var body: some View {
        ZStack {
            Color.black
                .opacity(0.7)
                .ignoresSafeArea()
                .onTapGesture { isShowing = false }
            
            VStack(spacing: 13.3) {
                Text("프로필 사진 신고")
                    .font(.custom(Font.medium.rawValue, size: 16.7))
                    .foregroundColor(Color(hex: "eeeeee"))
                
                Text("신고제도를 남용할 경우, 계정에 제약이 있을 수 있습니다.\n프로필 사진을 신고하시겠습니까?")
                    .font(.custom(Font.medium.rawValue, size: 13.3))
                    .foregroundColor(Color(hex: "909090"))
                
                HStack(spacing: 26.7) {
                    Spacer()
                    
                    Text("취소")
                        .font(.custom(Font.medium.rawValue, size: 13.3))
                        .foregroundColor(Color(hex: "9970ff"))
                        .onTapGesture {
                            isShowing = false
                        }
                    
                    Text("신고")
                        .font(.custom(Font.medium.rawValue, size: 13.3))
                        .foregroundColor(Color(hex: "9970ff"))
                        .onTapGesture {
                            isShowing = false
                            confirmAction()
                        }
                }
                .padding(.top, 13.3)
            }
            .padding(24)
            .frame(width: screenSize().width - 33.3)
            .background(Color(hex: "222222"))
            .cornerRadius(13.3)
        }
    }
}