{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"
            iteration="i"
        >
            <li
                title="{award.name}"
                class="tb-teaser-awards__list-item flex items-center{f:if(condition:'{i.cycle} != 1', then: ' mt-2')}"
            >
                <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>
            </li>
        </f:for>
    </ul>
</f:if>
