<?php
if (!isset($admin_header_extra)) {
    $admin_header_extra = '';
}
?>
<header class="header">
    <div class="header-left">
        <button type="button" class="sidebar-toggle" id="adminSidebarToggle" aria-label="باز و بسته کردن منو">
            <i class="fas fa-bars"></i>
        </button>
        <a href="index.php" class="header-logo"><span>پنل مدیریت</span></a>
    </div>
    <div class="header-right">
        <?= $admin_header_extra ?>
        <span class="header-meta-time text-muted small"><i class="far fa-clock ms-1"></i><?= date('Y/m/d H:i') ?></span>
        <?php if (!empty($_SESSION['admin_username'])): ?>
        <span class="header-meta-user small fw-semibold"><?= htmlspecialchars($_SESSION['admin_username']) ?></span>
        <?php endif; ?>
    </div>
</header>
