{% import "tungsten/components/ui.html" as ui %} {% if v.avatar %}
{% if v.avatar.url %} {% else %}{{ ui.avatar(v.avatar.name, None, 'h-10 w-10') }}{% endif %} {% endif %}
{% if v.description and v.description_position == 'above' %}{{ v.description }}{% endif %} {% if not v.entries %} {{ v.placeholder if v.placeholder is not none else '' }} {% elif v.badge %}
{% for it in v.entries %}{{ ui.badge(it.text, it.color or 'gray', it.icon) }}{% endfor %} {% if v.more %}{{ __('+:count more', count=v.more) }}{% endif %}
{% else %} {% set tag = 'ul' if v.as_list else 'div' %} <{{ tag }} class="{{ 'list-disc ps-4' if v.as_list else 'flex flex-wrap items-center gap-x-1' }} {{ v.size }} {{ v.weight }} {{ 'font-mono' if v.mono }}"> {% for it in v.entries %} {% set inner %}{% set icls = 'h-4 w-4 shrink-0 ' ~ (colors.pick(colors.TEXT, v.icon_color) if v.icon_color else '') %}{% if it.icon and v.icon_position == 'before' %}{{ icon(it.icon, icls) }}{% endif %}{% if it.prefix %}{{ it.prefix }}{% endif %}{{ it.text }}{% if it.suffix %}{{ it.suffix }}{% endif %}{% if it.icon and v.icon_position == 'after' %}{{ icon(it.icon, icls) }}{% endif %}{% endset %} <{{ 'li' if v.as_list else 'span' }} class="{{ 'inline-flex items-center gap-1.5' if not v.as_list }} {{ colors.pick(colors.TEXT, it.color) if it.color else 'text-gray-950 dark:text-white' }}" {% if it.full %}title="{{ it.full }}"{% endif %}> {% if v.url %}{{ inner }}{% else %}{{ inner }}{% endif %} {% if v.copyable %}{% endif %} {%- if not v.as_list and not loop.last %},{% endif -%} {% endfor %} {% if v.more %}{{ __('+:count more', count=v.more) }}{% endif %} {% endif %} {% if v.description and v.description_position == 'below' %}{{ v.description }}{% endif %}
{% if v.avatar %}
{% endif %}