{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<f:if condition="{article.awardsForList}">
    <ul class="tb-teaser-awards list-reset my-2">
        <f:for each="{article.awardsForList}" as="award">
            <li class="tb-teaser-awards__list-item flex items-center">
                <f:if condition="{award.image}">
                    <f:then>
                        <img
                            src="{award.image}"
                            class="w-16 mr-2 tb-teaser-awards__image"
                            alt="{award.name}"
                        />
                    </f:then>
                    <f:else if="{award.value}">
                        <f:for each="{vh:collection.range(start: 1, end: award.value)}" as="num">
                            <svg class="tb-teaser-awards__icons text-yellow w-4 h-4 mr-1"><use xlink:href="#icon-{award.iconName}"></use></svg>
                        </f:for>
                        <div class="mr-1"></div>
                    </f:else>
                </f:if>
                <span class="tb-awards__text">
                    {award.name}
                </span>
            </li>
        </f:for>
    </ul>
</f:if>
