{% load dwll %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <div class="container"><a class="navbar-brand" href="/">{% display_message 'menu.logo' 'Tu Logo Aquí' %}</a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
          <li class="nav-item"><a class="nav-link active" aria-current="page" href="/">{% display_message 'menu.home' 'Inicio' %}</a></li>
          <li class="nav-item"><a class="nav-link" href="#about">{% display_message 'menu.knowmore' 'Conoce Más' %}</a></li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarAccount" role="button" 
                data-bs-toggle="dropdown" aria-expanded="false">
                <i class="ri-user-fill"></i>&nbsp;{% display_message 'menu.language' 'Lenguaje' %}
            </a>
            <ul class="dropdown-menu" aria-labelledby="navbarAccount">
              {% get_languages as languages %}
              {% for lang in languages %}
              <li class="nav-item">
                <a class="dropdown-item {% if lang.is_selected %}active{% endif %}" 
                    href="{% url 'change-language' name=lang.name %}">{{lang.title}}</a> 
              </li>
              {% endfor %}
            </ul>
          </li>
          {% if not user.is_authenticated %}
          <li class="nav-item"><a class="nav-link" href="{% url 'account_login' %}">
            {% display_message 'menu.login' 'Ingresar' %}</a>
          </li>
          {% else %}
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarAccount" role="button" 
                data-bs-toggle="dropdown" aria-expanded="false">
                <i class="ri-user-fill"></i>&nbsp;
                {% if user.firstname %}{{user.firstname}}{% else %}{{user.username}}{% endif %}
            </a>
            <ul class="dropdown-menu" aria-labelledby="navbarAccount">
              <li class="nav-item">
                <a class="dropdown-item" 
                    href="{% url 'account_logout' %}">
                    {% display_message 'menu.logout' 'Salir' %}
                </a> 
              </li> 
            </ul>
          </li>
        {% endif %} 
        </ul>
      </div>
    </div>
</nav>