{% extends "collection/serialize/ap_htmx_table/record.html" %}

{% block value %}
    {% if column == "row_actions" %}
        <a
            data-module="ap-tooltip ap-copy-to-clipboard"
            data-module-content="{{ data.url }}"
            title="{{ _('Copy file URL')}}"
            class="btn btn-black">
            <i class="fas fa-copy"></i>
        </a>

        <a
            href="{{ data.url }}"
            download
            data-module="ap-tooltip"
            title="{{ _('Download file')}}"
            class="btn btn-primary">
            <i class="fas fa-download"></i>
        </a>

        <a
            data-module="ap-tooltip" title="{{ _('Remove a file') }}"
            class="btn btn-danger"
            href="{{ h.url_for('file_manager.delete', file_id=data.id) }}"
            hx-swap="none" hx-trigger="click" hx-post="{{ h.url_for('file_manager.delete', file_id=data.id) }}">
            <i class="fa fa-trash-alt"></i>
        </a>
    {% else %}
        {{ super() }}
    {% endif %}
{% endblock value %}
