
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><svg><use href='#\(label.icon.icon.name)'></use></svg>\(label.value)</div>"
        }
        result += "</div>"
    }
}
