{% load i18n %}
{% load humanize %}
{% load price_formats %}

<div class="table-responsive">
    <table class="table table-striped table-hover mb-0 w-100">
        <thead>
            <tr>
                <th>{% trans "Wallet Name" %}</th>
                <th>{% trans "Division" %}</th>
                <th class="text-right">{% trans "Current Balance" %}</th>
                <th>{% trans "Associated Program" %}</th>
            </tr>
        </thead>
        <tbody>
            {% for program in funded_programs %}
                <tr>
                    <td><strong>{{ program.wallet.name }}</strong></td>
                    <td>{{ program.wallet.division_id }}</td>
                    <td class="text-right">
                        <span class="text-success">{{ program.wallet.balance|custom_number_format:2|price }}</span>
                    </td>
                    <td>
                        <span class="badge bg-primary">{{ program.name }}</span>
                    </td>
                </tr>
            {% empty %}
                <tr>
                    <td colspan="4" class="text-center text-muted">
                        {% trans "No wallets synced or active programs found." %}
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
