import SwiftUI

public struct TagView: View {
    private var icon: Image
    private var value: String

    public init(icon: Image, value: String) {
        self.icon = icon
        self.value = value
    }

    public var body: some View {
        HStack(spacing: 4) {
            icon
                .resizable()
                .frame(width: 20, height: 20)

            Text(value)
                .typographyV1(.monospace)
                .textCase(.uppercase)
                .foregroundStyle(Color.SemanticV1.textPrimary)
        }
        .padding(.horizontal, 10)
        .padding(.vertical, 4)
        .background(Color.SemanticV1.backgroundSecondary)
        .clipShape(RoundedRectangle(cornerRadius: 16))
    }
}
