//
//  ComplimentView.swift
//
//
//  Created by Victor on 31/07/2024.
//

import SwiftUI

struct ComplimentView: View {
    var body: some View {
        ZStack(alignment: .topTrailing) {
            VStack(spacing: 4) {
                VStack {
                    SQIcon(.gen_euro_sign, size: .xl, color: .sqGreen(100))
                }
                .frame(width: 56, height: 56, alignment: .center)
                .background(Color.sqGreen(10))
                .cornerRadius(100)
                SQText("Excellent rapport qualité/prix", size: 11, font: .demiBold)
                    .multilineTextAlignment(.center)
                    .foregroundColor(Color.sqNeutral(90))
            }
            .padding(.top, 4)
            .frame(width: 87)

            HStack {
                SQText("1", size: 11, font: .bold)
                    .foregroundColor(Color.sqNeutral())
                    .padding(.horizontal, 6)
                    .frame(height: 16)
                    .background(.white)
                    .cornerRadius(30)
                    .overlay(
                        RoundedRectangle(cornerRadius: 30)
                            .stroke(Color.sqNeutral(60), lineWidth: 1)
                    )
            }
            .padding(.trailing, 10)
        }
    }
}

#Preview {
    ComplimentView()
}
