{% include 'header.html' %}

<h1 align="center">PANEL DE CONFIRMACIONES</h1>
<br>
<div class="accordion" id="accordionExample">
    <div class="accordion-item">
      <h2 class="accordion-header" id="headingOne">
        <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
            {% for cuenta in cuentaconfirmados %}
            INVITADOS CONFIRMADOS: {{ cuenta[0] }}
            {% endfor %}
        </button>
      </h2>
      <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
        <div class="accordion-body">
            <table class="table table-lightw">
                <thead class="thead-light">
                    <tr>
                        <th>ID</th>
                        <th>Nombre Completo</th>
                        <th>Teléfono</th>
                        <th>Confirmación</th>
                    </tr>
                </thead>
                    {% for confirmado in confirmados %}
                    <tr>
                        <td id="id">{{ confirmado[0] }}</td>
                        <td>{{ confirmado[1] }}</td>
                        <td>{{ confirmado[4] }}</td>   
                        <td>{% if confirmado[2] == 0 %} NO
                        {% elif confirmado[2] == 1 %} SI
                        {% else %} Pendiente
                        {% endif %}</td>      
                    </tr>
                    {% endfor %}
            </table>
        </div>
      </div>
    </div>
    <div class="accordion-item">
      <h2 class="accordion-header" id="headingTwo">
        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
            {% for cuenta in cuentanoconfirmados %}
            INVITADOS QUE NO ASISTIRAN:  {{ cuenta[0] }}
            {% endfor %}
        </button>
      </h2>
      <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
        <div class="accordion-body">
            <table class="table table-lightw">
                <thead class="thead-light">
                    <tr>
                        <th>ID</th>
                        <th>Nombre Completo</th>
                        <th>Teléfono</th>
                        <th>Confirmación</th>
                    </tr>
                </thead>
                    {% for noconfirmado in noconfirmados %}
                    <tr>
                        <td id="id">{{ noconfirmado[0] }}</td>
                        <td>{{ noconfirmado[1] }}</td>
                        <td>{{ noconfirmado[4] }}</td>   
                        <td>{% if noconfirmado[2] == 0 %} NO
                        {% elif noconfirmado[2] == 1 %} SI
                        {% else %} Pendiente
                        {% endif %}</td>      
                    </tr>
                    {% endfor %}
            </table>
        </div>
      </div>
    </div>
    <div class="accordion-item">
      <h2 class="accordion-header" id="headingThree">
        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
            {% for cuenta in cuentapendientes %}
            INVITADOS SIN CONFIRMAR: {{ cuenta[0] }}
            {% endfor %}
        </button>
      </h2>
      <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
        <div class="accordion-body">
            <table class="table table-lightw">
                <thead class="thead-light">
                    <tr>
                        <th>ID</th>
                        <th>Nombre Completo</th>
                        <th>Teléfono</th>
                        <th>Confirmación</th>
                    </tr>
                </thead>
                    {% for pendiente in pendientes %}
                    <tr>
                        <td id="id">{{ pendiente[0] }}</td>
                        <td>{{ pendiente[1] }}</td>
                        <td>{{ pendiente[4] }}</td>   
                        <td>{% if pendiente[2] == 0 %} NO
                        {% elif pendiente[2] == 1 %} SI
                        {% else %} Pendiente
                        {% endif %}</td>      
                    </tr>
                    {% endfor %}
            </table>
        </div>
      </div>
    </div>
</div>


{% include 'footer.html' %}