{% load i18n %}

<div class="row list-group-item d-flex align-items-center px-0">
    <div class="col-auto">
        {% if secret.content_type == secret.CONTENT_PASSWORD %}
            <i class="fa fa-user fa-fw"></i>
        {% elif secret.content_type == secret.CONTENT_FILE %}
            <i class="fa fa-file fa-fw"></i>
        {% elif secret.content_type == secret.CONTENT_CC %}
            <i class="fa fa-credit-card fa-fw"></i>
        {% endif %}
    </div>
    <div class="col-5 {% if not secret.username and not secret.filename %}flex-grow-1{% endif %}">
        <a href="{{ secret.get_absolute_url }}">
            {{ secret.name }}
        </a>
    </div>
    {% if secret.username or secret.filename %}
        <div class="col-4 flex-grow-1 text-truncate">
            {% if secret.username %}
                {{ secret.username }}
            {% endif %}
            {% if secret.filename %}
                {{ secret.filename }}
            {% endif %}
        </div>
    {% endif %}
    <div class="col-auto ms-auto text-end">
        {% if secret.status == secret.STATUS_DELETED %}
            <i class="fa fa-trash fa-fw text-danger"></i>
        {% elif secret.status == secret.STATUS_NEEDS_CHANGING %}
            <i class="fa fa-refresh fa-fw text-danger"></i>
        {% endif %}
        {% if secret not in readable_secrets %}
            <i class="fa fa-lock fa-fw text-danger"></i>
        {% endif %}
    </div>
</div>
