@if($currentUser->isInGroup(['Guest']))
<div class="d-inline-block dropdown">
    <a href="#" class="global-header__navbar-item dropdown-toggle" data-bs-toggle="dropdown">
        <span class="fas fa-fw fa-sign-in-alt"></span> @lang('Login')
    </a>
    <div class="dropdown-menu">
        <form action="{{ route('login') }}" method="post" class="px-3 py-2">
            @csrf
            <div class="form-floating mb-3">
                <input type="email" class="form-control {{ $errors->has('login-email') ? 'is-invalid' : '' }}" name="login-email" id="login-email" placeholder="email@example.com">
                <label for="login-email">@lang('Email address')</label>
            </div>
            <div class="form-floating mb-3">
                <input type="password" class="form-control {{ $errors->has('login-password') ? ' is-invalid' : '' }}" name="login-password" id="login-password" placeholder="Password">
                <label for="login-password">@lang('Password')</label>
            </div>
            <div class="form-check mb-3">
                <input type="checkbox" class="form-check-input" id="remember-me" name="remember-me">
                <label class="form-check-label text-nowrap" for="remember-me">@lang('Remember me?')</label>
            </div>
            <button type="submit" class="btn btn-primary">@lang('Login')</button>
        </form>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="{{ route('lost-password-page') }}">
            <span class="fas fa-fw fa-question-circle"></span> @lang('Forgot password?')
        </a>
    </div>
</div>
<a href="{{ route('register-page') }}" class="global-header__navbar-item">
    <span class="fas fa-fw fa-user-plus"></span> @lang('Sign Up')
</a>
@else
<form action="{{ route('logout') }}" method="post" class="d-inline-block">
    @csrf
    <button class="btn global-header__navbar-item"><span class="fas fa-fw fa-sign-out-alt"></span> @lang('Logout')</button>
</form>
@endguest
