package de.kif.frontend.views.calendar

import de.kif.common.ConstraintError
import de.westermann.kwebview.ViewCollection
import de.westermann.kwebview.components.TextView
import de.westermann.kwebview.components.textView

class CalendarErrors() : ViewCollection<TextView>() {

    fun setErrors(errors: List<ConstraintError>) {
        clear()

        for (error in errors) {
            textView(error.reason)
        }
    }
}