{% from 'attachments/_attachments.html' import get_attachment_icon %}

{% block content %}
    <div class="attachment-preview-top-bar flexrow">
        <div class="attachment-title f-self-stretch truncate-text">
            <span class="{{ get_attachment_icon(attachment) }}">{{ attachment.title }}</span>
        </div>
        <div class="attachment-actions">
            <a href="{{ attachment.download_url }}" target="_blank" rel="noopener noreferrer"
               title="{% trans %}Download{% endtrans %}"
               class="i-button icon icon-file-download attachment-download" download>
                {%- trans %}Download{% endtrans -%}
            </a>
        </div>
        <div class="attachment-preview-close">
            <a class="icon icon-close js-close-preview" title="{% trans %}Close{% endtrans %}"></a>
        </div>
    </div>
    <div class="attachment-preview-content-wrapper">
        <div class="attachment-preview-content">
            {{ preview_content | safe }}
        </div>
    </div>
{% endblock %}
