//
//  BoosterHistoryCellView.swift
//
//
//  Created by Victor on 19/06/2024.
//

import SwiftUI

struct BoosterHistoryCellView: View {
    var isEnded: Bool = false
    
    var body: some View {
        ZStack {
            HStack(alignment: .center) {
                SQIcon(.calendar, color: .sqRoyal())
                SQText("Samedi 20 avril", font: .bold)
                    .foregroundColor(.sqRoyal())
            }
            .frame(maxWidth: .infinity)
        }
        .overlay(
            ZStack(alignment: .topLeading) {
                Image("booster_corner")
                    .resizable()
                    .frame(width: 50, height: 50)
                    .cornerRadius(8, corners: [.topLeft, .bottomLeft])
                RoundedRectangle(cornerRadius: 8)
                    .stroke(Color.sqRoyal(), lineWidth: 2.0)
            }
        )
        .opacity(isEnded ? 0.5 : 1)
        .padding()
    }
}

#Preview {
    BoosterHistoryCellView()
}
