
struct ContentLabels: HtmlProducer {

    private let labels: [ContentLabel]

    init(labels: [ContentLabel]) {
        self.labels = labels
    }

    func populate(_ result: inout String) {
        guard !labels.isEmpty else {
            return
        }
        result += "<div class='labels-container'>"
        for label in labels {
            result += "<div>"
            result += label.icon.usageString
            result += "\(label.value)</div>"
        }
        result += "</div>"
    }
}
