@if(!$user)
    <i data-lucide="user"></i>
@else
    @if($user->getAvatarUrl())
        <img src="{{ $user->getAvatarUrl('m') }}" alt="avatar">
    @else
        <div style="
            background: {{\App\Helpers\XenForoHelpers::getAvatarColor($user) }};
            width: 40px; height: 40px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            color:var(--text); font-weight: bold;
        ">
            {{ \App\Helpers\XenForoHelpers::getAvatarLetter($user) }}
        </div>
    @endif
@endif
