@if($auth ?? true)
    @if (siberfx_auth()->guest())
        <li class="nav-item">
            <a class="nav-link" href="{{ route('siberfx.auth.login') }}">
                <i class="nav-icon la la-sign-in-alt d-block d-lg-none d-xl-block"></i> <span>{{ trans('siberfx::base.login') }}</span>
            </a>
        </li>
    @endif
    @if (config('siberfx.base.hide_profile', true))
        <li class="nav-item dropdown d-none d-lg-block">
            <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" role="button" aria-expanded="true">
                <span class="avatar avatar-sm rounded-circle me-2">
                    <img class="avatar avatar-sm rounded-circle bg-transparent" src="{{ siberfx_avatar_url(siberfx_auth()->user()) }}"
                         alt="{{ siberfx_auth()->user()->name }}" onerror="this.style.display='none'"
                         style="margin: 0;position: absolute;left: 0;z-index: 1;">
                    <span class="avatar avatar-sm rounded-circle siberfx-avatar-menu-container text-center">
                        {{ siberfx_user()->getAttribute('name') ? mb_substr(siberfx_user()->name, 0, 1, 'UTF-8') : 'A' }}
                    </span>
                </span>
                {{ siberfx_user()->name }}
            </a>
            <div class="dropdown-menu" data-bs-popper="static">
                @if(config('siberfx.base.setup_my_account_routes'))
                    <a class="dropdown-item" href="{{ route('siberfx.account.info') }}">
                        <i class="nav-icon la la-lock d-block"></i>
                        {{ trans('siberfx::base.my_account') }}
                    </a>
                @endif
                <a class="dropdown-item text-danger" href="{{ siberfx_url('logout') }}">
                    <i class="nav-icon la la-sign-out-alt d-block"></i>
                    {{ trans('siberfx::base.logout') }}
                </a>
            </div>
        </li>
    @endif
    <li class="nav-separator"></li>
@endif
