//
//  GameResumeFrame.swift
//  DouShouQi_App
//
//  Created by Rémi REGNAULT on 21/05/2024.
//

import SwiftUI

struct GameResumeFrame: View {
    
    // Players Params
    let Player1Name: String
    let Player2Name: String
    
    // Game Params
    let Status: String
    
    var body: some View {
        ZStack {
            HStack(alignment: .center) {
                VStack(alignment: .leading) {
                    Text("\(Player1Name) vs \(Player2Name)")
                        .font(.headline)
                    
                    Text(Status)
                        .font(.subheadline)
                        .foregroundColor(.gray)
                }
                
                Spacer()
                
                Text("Detail    >")
                    .frame(width: 100)
                    .foregroundColor(.gray)
            }
            
            .padding(10)
            .overlay(
                RoundedRectangle(cornerRadius: 3)
                    .stroke(.gray, lineWidth: 2)
            )
        }.padding(2)
    }
}

struct GameResumeFrame_Previews: PreviewProvider {
    static var previews: some View {
        GameResumeFrame(Player1Name: "Rayhan", Player2Name: "Remi", Status: "Winner: Remi")
    }
}
