//
//  ApplyAuditionCompleteDialog.swift
//  SodaLive
//
//  Created by klaus on 1/20/25.
//

import SwiftUI

struct ApplyAuditionCompleteDialog: View {
    
    let auditionTitle: String
    let roleName: String
    
    @Binding var isShowing: Bool
    
    var body: some View {
        ZStack {
            Color.black
                .opacity(0.5)
            
            VStack(spacing: 0) {
                Text("오디션 지원")
                    .font(.custom(Font.bold.rawValue, size: 18.3))
                    .foregroundColor(Color.grayee)
                    .padding(.top, 26.7)
                
                Text("보이스온 오디션에 지원해 주셔서 감사합니다.")
                    .font(.custom(Font.medium.rawValue, size: 15))
                    .foregroundColor(Color.graybb)
                    .padding(.top, 15)
                
                Text(auditionTitle)
                    .font(.custom(Font.bold.rawValue, size: 18.3))
                    .foregroundColor(Color.graybb)
                    .padding(.top, 20)
                
                Text(roleName)
                    .font(.custom(Font.medium.rawValue, size: 13.3))
                    .foregroundColor(Color.graybb)
                    .padding(.top, 10)
                
                Text("확인")
                    .font(.custom(Font.bold.rawValue, size: 18.3))
                    .foregroundColor(Color.white)
                    .padding(.vertical, 16)
                    .frame(maxWidth: .infinity)
                    .background(Color.button)
                    .cornerRadius(8)
                    .contentShape(Rectangle())
                    .padding(.horizontal, 18.3)
                    .padding(.top, 35)
                    .padding(.bottom, 16.7)
                    .onTapGesture {
                        isShowing = false
                    }
            }
            .frame(maxWidth: .infinity)
            .background(Color.gray22)
            .cornerRadius(10)
            .padding(.horizontal, 13.3)
        }
    }
}

#Preview {
    ApplyAuditionCompleteDialog(
        auditionTitle: "스위치온",
        roleName: "장예은",
        isShowing: .constant(true)
    )
}
