{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
{namespace common=Newland\Toubiz\Common\Neos\ViewHelpers}
{namespace poi=Newland\Toubiz\Poi\Neos\ViewHelpers}

<f:if condition="{article.flatAttributes.difficultyRating}
    || {article.flatAttributes.difficultyRating.hasContents}"
>
    <span class="tb-teaser__difficulty-wrapper">
        <strong
            class="tb-teaser-difficulty {f:if(condition: '{article.flatAttributes.difficultyRating.intValue} === 0', then: 'tb-teaser-difficulty--easy')}{f:if(condition: '{article.flatAttributes.difficultyRating.intValue} === 1', then: 'tb-teaser-difficulty--medium')}{f:if(condition: '{article.flatAttributes.difficultyRating.intValue} === 2', then: 'tb-teaser-difficulty--hard')}"
        >
            <vh:translate
                id="property.attribute.difficultyRating.values.{article.flatAttributes.difficultyRating.intValue}"
                package="Newland.Toubiz.Poi.Neos"
                source="Models/Article" />
        </strong>
    </span>
</f:if>