<div class="profile-status-badge flex items-center space-x-2" wire:poll.30s="checkStatus">
    @if($showIcon)
        <div class="
            flex-shrink-0
            @if($size === 'sm') w-2 h-2
            @elseif($size === 'md') w-2 h-2
            @else w-2 h-2 @endif
            @if($status === 'online') bg-green-500
            @elseif($status === 'idle') bg-yellow-500
            @else bg-gray-400 @endif
            rounded-full">
        </div>
    @endif

    @if($showText)
        <span class="
            @if($size === 'xs') text-xs
            @elseif($size === 'sm') text-sm
            @elseif($size === 'lg') text-base lg:text-lg
            @else text-base @endif
            @if($status === 'online') text-green-600 dark:text-green-400
            @elseif($status === 'idle') text-yellow-600 dark:text-yellow-400
            @else text-theme-muted dark:text-theme-muted @endif">
            @if($status === 'online') {{ __('Online') }}
            @elseif($status === 'idle') {{ __('Idle') }}
            @else {{ $lastSeen ? __('Last seen') . ' ' . $lastSeen->diffForHumans() : __('Offline') }}
            @endif
        </span>
    @endif
</div>