{% for c in farm.cosmetics %}
<div class="perk-card">
    <span class="perk-icon" aria-hidden="true">{{ c.icon }}</span>
    <strong class="perk-name">{{ c.name }}</strong>
    <span class="perk-effect">{{ c.description }}</span>
    {% if c.owned %}
        {% if c.kind == 'title' %}
        {% if farm.active_title == c.key %}
        <span class="perk-maxed">Equipped</span>
        {% else %}
        <form method="post" action="/game/cosmetics/equip" data-game-action="cosmetic-equip">
            <input type="hidden" name="key" value="{{ c.key }}">
            <button type="submit" class="btn btn-sm">Equip</button>
        </form>
        {% endif %}
        {% else %}
        <span class="perk-maxed">Owned</span>
        {% endif %}
    {% else %}
    <form method="post" action="/game/cosmetics/buy" data-game-action="cosmetic-buy">
        <input type="hidden" name="key" value="{{ c.key }}">
        <button type="submit" class="btn btn-sm" data-confirm="Buy {{ c.name }} for {{ format_exact(c.cost_coins) }} coins?">Buy ({{ format_coins(c.cost_coins) }})</button>
    </form>
    {% endif %}
</div>
{% endfor %}
