//
//  NeihborsCard.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 05/06/2025.
//

import SwiftUI

struct NeihborsCard: View {
    var body: some View {
        VStack(alignment: .leading) {
            HStack(spacing: 8) {
                AVAvatar(model: AVAvatarModel(avatarString: "https://preprod.allovoisins.com//uploads/u/avatars/9/b/9/9b93e04d6d_4681618_l.jpg", onlineStatus: .online(), sizing: .L))
                VStack(alignment: .leading) {
                    SQText("Julien L.")
                        .sqFont(.semiBold)
                    SQText("Julien, Petits Jobs À Nantes")
                        .sqSize(12)
                        .sqFont(.semiBold)
                    SQText("Nantes (Gloriette-Feydeaux) - 3,1 km")
                        .sqSize(12)
                        .sqColor(.sqNeutral(80))
                    SQText("En ligne")
                        .sqSize(12)
                        .sqColor(.sqNeutral(80))
                }
                Spacer()
            }

            HStack {
                SQImage("ladame", height: 100)
                SQImage("ladame", height: 100)
            }

            HStack {
                SQIcon(.star, type: .solid, color: .sqGold(50))
                SQText("4,5/5")
                    .sqFont(.bold)
                SQText("(35 avis)")
            }
        }
        .frame(height: 247)
        .padding()
        .overlay(
            RoundedRectangle(cornerRadius: 8)
                .inset(by: 0.5)
                .stroke(Color.sqNeutral(20), lineWidth: 1)
        )
    }
}

#Preview {
    NeihborsCard()
        .padding()
}
