<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cadeaux de Noël pour Louisa</title>
    <link rel="stylesheet" href="/styles.css">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
  </head>
</head>
<body>
    <div class="container mt-4">
        <div class="mt-4 p-5 bg-danger text-white rounded">
            <h1>Liste des cadeaux pour Louisa</h1>
            <p>{{ message }}</p>
        </div>
    </div>
    <br>
    <br>
    
    <div class="tableau">
        <ul style="display: none">
            <li>&nbsp;</li>
            <li>&nbsp;</li>
            <li>&nbsp;</li>
            <li>Qui va l'offrir ?</li>
            <li>Statut</li>
            <li>Noël ou son anniv' ?</li>
            <li>Emballé ?</li>
        </ul>
        {{#each cadeaux}}
        <ul>
            <li><a href="{{this.lien}}" target="_blank">Voir le produit</a></li>
            <li>
                <figure class="figure">
                    <img src="{{this.photo}}" class="figure-img img-fluid rounded" alt="Pas d'image" ob>
                    <figcaption class="figure-caption">{{this.libelle}}</figcaption>
                </figure>
            </li>
            <li>{{this.prix}} €</li>
            <li>{{#if this.acheteur}}{{this.acheteur}}
                {{else}}<a href="/choix-offrant?cadeau={{this.id}}" class="btn">Le réserver</a>{{/if}}
            </li>
            <li>
                <div class="form-check form-switch">
                {{#if this.achete}}
                    <label class="form-check-label">Déja acheté{{#equals this.responsableAchat "Les parents"}}{{#unless this.paye}}<br>A rembourser{{/unless}}{{/equals}}</label>
                {{else}}
                    <label class="form-check-label">A acheter{{#equals this.responsableAchat "Les parents"}}{{#unless this.paye}}<br>A rembourser{{/unless}}{{/equals}}</label>
                {{/if}}
                </div>              
            <li>{{#if this.pourNoel}}Noël{{else}}Anniversaire{{/if}}</li>
            <li>
                {{#if this.achete}}
                    {{#if this.emballe}}
                        <label class="form-check-label">Emballé</label>
                    {{else}}
                        <label class="form-check-label"><b>A emballer</b></label>
                    {{/if}}
                {{else}}
                    &nbsp;    
                {{/if}}
            </li>
        </ul>
        {{/each}}
    </div>
</body>
</html>
