{% extends "base.html.twig" %}

{% block pp %}{{pp}}{% endblock %}

{% block css %}{{css}}{% endblock %}

{% block title %}Amis - HearthTrack{% endblock %}

{% block user %}{{user}} - {{role}}{% endblock %}

{% block body %}
<div class="container-fluid px-4">
    <h1 class="mt-4">Liste d'ami</h1>
        <ol class="breadcrumb mb-4">
            <li class="breadcrumb-item"><a href="home.html">Accueil</a></li>
            <li class="breadcrumb-item active">Ami</li>
        </ol>
        <style>.btn-mrg{margin:15px; margin-left:87%}</style>
        <button class="btn btn-primary btn-mrg" id="btnNavbarSearch" type="button">Ajouter un ami</button>
        
                             <div class="card-body">
                            <div class="datatable-container">                                
                            	<table id="datatablesSimple" class="datatable-table">
                                {% if friendship is empty %}
                                        <p>Vous n'avez aucun ami .</p>
                                    {% else %}
                                    <thead>
                                        <tr>
                                            <th></th>
                                            <th>Nom</th>
                                            <th>Prénom</th>
                                            <th>Status</th>
                                            <th></th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for ami in friendship %}
                                            <tr>
                                                <td><style> .image-ronde{ clip-path:ellipse(50% 50%); } </style>
                                                <img src="/assets/img/person/{{ami.img}}.png" width="35px" height="35px" class="image-ronde"></td>
                                                <td>{{ami.nom}}</td>
                                                <td>{{ami.prenom}}</td>
                                                <td>{{ami.status}}</td>
                                                <td>
                                                    <a href="#"><img src="/assets/img/msg.png"></a>
                                                    <a href="#"><img src="/assets/img/block.png"></a>
                                                    <a href="#"><img src="/assets/img/delete.png"></a>
                                                </td>
                                            </tr>
                                        {% endfor %}
                                    {% endif %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                </div>
          </div>
    </div>
{% endblock %}