<?php

/**
 * This file is part of JohnCMS Content Management System.
 *
 * @copyright JohnCMS Community
 * @license   https://opensource.org/licenses/GPL-3.0 GPL-3.0
 * @link      https://johncms.com JohnCMS Project
 */

/**
 * @var string $who_url
 * @var string $who_name
 * @var array $online
 */
?>
<div class="flex items-center justify-between pt-4 pb-4 mt-4 border-t border-gray-200">
    <?php if (! empty($online)): ?>
        <div class="flex items-center gap-3">
            <?php if ($user->isValid()): ?>
                <a href="<?= $who_url ?>" class="text-sm font-medium text-gray-700 hover:text-blue-600 transition-colors">
                    <?= $who_name ?>
                </a>
            <?php else: ?>
                <span class="text-sm font-medium text-gray-700">
                    <?= $who_name ?>
                </span>
            <?php endif; ?>
            <span class="bg-gray-600 text-white text-sm font-medium px-2.5 py-1 rounded-full">
                <?= $online['online_u'] ?> / <?= $online['online_g'] ?>
            </span>
        </div>
    <?php endif; ?>
    
    <div class="flex items-center">
        <a href="/help/?act=forum" class="text-sm text-blue-600 hover:text-blue-800 transition-colors">
            <?= __('Forum rules') ?>
        </a>
    </div>
</div>