{% from 'wallet/send/new/components/coin_selection_item.jinja' import coin_selection_item %}

{# 
    coin_selection_table - List of the wallet UTXO for coin selection
    Parameters:
    - unspents: List of wallet UTXOs
    - explorer: explorer link
 #}
{% macro coin_selection_table(unspents, explorer) -%}
    <table style="table-layout: fixed; display: none;" id="coin_selection_table">
        <thead>
        <tr>
            <th></th><th>TxID</th><th>Address</th><th>Amount</th>
        </tr>
        </thead>
        <tbody>
            {% for tx in unspents %}
                {% from 'wallet/send/new/components/coin_selection_item.jinja' import coin_selection_item %}
                {{ coin_selection_item(tx['txid'], tx['vout'], tx['amount'], tx['address'], tx['label'], explorer) }}
            {% endfor %}
        </tbody>
    </table>
{%- endmacro %}
