import SwiftUI

struct PropertyDetailItem: View {
    let icon: String
    let value: String
    let label: String

    var body: some View {
        VStack(spacing: 4) {
            Image(systemName: icon)
                .font(.caption)
                .foregroundColor(Color.appPrimary)

            Text(value)
                .font(.subheadline)
                .fontWeight(.semibold)
                .foregroundColor(Color.appTextPrimary)

            Text(label)
                .font(.caption2)
                .foregroundColor(Color.appTextSecondary)
        }
        .accessibilityElement(children: .combine)
        .accessibilityLabel(A11y.Common.stat(value: value, label: label))
    }
}

#Preview {
    HStack(spacing: 24) {
        PropertyDetailItem(icon: "bed.double.fill", value: "3", label: "Beds")
        PropertyDetailItem(icon: "shower.fill", value: "2.5", label: "Baths")
        PropertyDetailItem(icon: "square.fill", value: "1800", label: "Sq Ft")
    }
    .padding()
}
