{% import "helper.twig" as helper %}

<div class="mb-3">
<span class="text-muted" title="{% trans %}lastModified{% endtrans %}">
    <i class="fas fa-history fa-fw"></i> {{ part.lastModified | format_datetime("short") }}
</span>
    <br>
    <span class="text-muted mt-1" title="{% trans %}createdAt{% endtrans %}">
    <i class="fas fa-calendar-plus fa-fw"></i> {{ part.addedDate | format_datetime("short") }}
</span>
</div>

{# Part mass #}
{% if part.mass %}
    <div>
        <h6>
            <span class="badge badge-secondary" title="{% trans %}part.mass.tooltip{% endtrans %}"><i class="fas fa-weight-hanging fa-fw"></i> {{ part.mass | siFormat("g") }}</span>
        </h6>
    </div>
{% endif %}

{# Needs Review tag #}
{% if part.needsReview %}
    <div class="mt-1">
        <h6>
            <span class="badge badge-warning"><i class="fas fa-ambulance fa-fw"></i> {% trans %}part.needs_review.badge{% endtrans %}</span>
        </h6>
    </div>
{% endif %}

{# Favorite Status tag #}
{% if part.favorite %}
    <div class="mt-1">
        <h6>
            <span class="badge badge-success"><i class="fas fa-award fa-fw"></i> {% trans %}part.favorite.badge{% endtrans %}</span>
        </h6>
    </div>
{% endif %}

{% if part.obsolete %}
    <div class="mt-1">
        <h6>
            <span class="badge badge-danger"><i class="fas fa-ghost fa-fw"></i> {% trans %}part.obsolete.badge{% endtrans %}</span>
        </h6>
    </div>
{% endif %}

{# Manufacturing status tag #}
<div class="mt-1">
    <h6>
        {{ helper.m_status_to_badge(part.manufacturingStatus) }}
    </h6>
</div>

{# Show tags #}
{% if part.tags is not empty %}
    <div class="mt-1">
        <h6 style="line-height: 1.5;">
            {{ helper.string_to_tags(part.tags) }}
        </h6>
    </div>
{% endif %}