{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}

<div class="order-invoices-wrapper" id="order-invoices">
    <h3 class="h4" id="shipping-state">{{ 'sylius_invoicing_plugin.ui.invoices'|trans }}</h3>
    <table class="table">
        <thead>
        <tr>
            <th class="cell-number">{{ 'sylius.ui.number'|trans }}</th>
            <th class="cell-date">{{ 'sylius_invoicing_plugin.ui.issued_at'|trans }}</th>
            <th class="cell-actions text-right">{{ 'sylius.ui.actions'|trans }}</th>
        </tr>
        </thead>
        <tbody>
        {% for invoice in invoices %}
            <tr>
                <td class="cell-number">
                    {{ invoice.number }}
                </td>
                <td class="cell-date">
                    {{ invoice.issuedAt|format_date }}
                </td>
                <td class="cell-actions text-right">
                    {% set path = path('sylius_invoicing_plugin_shop_invoice_download', { 'id': invoice.id }) %}
                    <a href="{{ path }}" class="btn btn-outline-primary btn-sm">{{ 'sylius_invoicing_plugin.ui.download_invoice'|trans }}</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
