{% set Charge = 0 %}
{% extends 'base.html.twig' %}

{% block title %}LODMI{% endblock %}

{% block body %}
{% include '_partials/_navbar.html.twig' %}
    <div class="container">
        <div class="row">
            <div class="col-lg-12 card mt-4">
                <div class="text-center">
                    <h1 class="card-title">{{ borne.id }}</h1>
                </div>
            </div>
        </div>
        <div class="row d-flex justify-content-lg-center">
            {% for connector in borne.connectors %}
            <div class="col-6 card mt-3 mb-3">
            
            
<div id="borneDiv" data-controller="borne"
     data-borne-id-value="{{ borne.id }}"
     data-borne-connectorid-value="{{ connector.connectorId }}"
     data-borne-tagid-value="{{ connector.currentTagID }}"
     data-borne-visualtagid-value="{{ connector.connectorId }}"
</div>
    <div class="alert alert-info mt-3">
        <h3>Informations connecteur :</h3>
        <hr>
        <i class="fa-solid fa-bolt"></i> Puissnace du chargeur : {{ connector.power /1000 }} KW<br>
        
        <i class="fa-solid fa-bolt"></i> Type de connecteur: : {{ connector.type }}<br>
     </div>

     {% if connector.status == 'Charging' %}
         {% set Charge = Charge + 1 %}
      {% endif %}
    <div class="alert alert-success form-inline">
        <h3>Fréquentation de la borne :</h3>
        <hr>
        <i class="fa fa-charging-station"></i> Ce point de charge était utilisé : {{Charge}} fois <br>
        
     </div>
    
     
        
  
  

</div>
            </div>
            {% endfor %}
             
        </div>
    </div>
        
{% endblock %}

