<button type="button" class="btn bg-light green-dark p-0" data-toggle="dropdown">
    @if (App\Repositories\Shop\Customers::isConnected())
        {!! App\Repositories\Shop\CustomerAvatars::getImg() !!}
    @else
        <img src='/img/header/login.svg' width='36px' alt='login'>
    @endif

</button>

<ul class="dropdown-menu" aria-labelledby="Connexion">
    @if (App\Repositories\Shop\Customers::isConnected())
        <li class="dropdown-item">
            <a href="{{ route('Shop.Customers.profile') }}" title="Accèdez à vos factures, remises ..." rel="nofollow">
                <span>Votre compte</span>
            </a>
        </li>
        <li class="dropdown-item">
            <a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                Déconnexion
            </a>

            <form id="logout-form" action="{{ route('Shop.logout') }}" method="POST" style="display: none;">
                @csrf
            </form>

        </li>
    @else
        <li class="dropdown-item">
            <a href="{{ route('Shop.login') }}" title="Identifiez-vous" rel="nofollow">
                <span>Connexion</span>
            </a>
        </li>
        <li class="dropdown-item">
            <a href="{{ route('Shop.register') }}" title="Enregistrez-vous" rel="nofollow">
                <span>Creer votre compte</span>
            </a>
        </li>
    @endif
    <li class="dropdown-item">
        <a href="https://www.jardinenvie.com/boutique/commander" title="Télécharger le catalogue" rel="nofollow">
            <span>Télécharger le catalogue</span>
        </a>
    </li>
</ul>
