

<header id="sinagem-header">

    
    <button id="sidebarToggle" class="hdr-toggle" type="button" aria-label="Abrir menu">
        <i class="fas fa-bars"></i>
    </button>

    
    <div class="hdr-page-area">
        <div class="hdr-page-title">
            <?php echo $__env->yieldContent('page-title', 'Dashboard'); ?>
        </div>
        <div class="hdr-breadcrumb">
            <?php echo $__env->yieldContent('breadcrumb'); ?>
        </div>
    </div>

    
    <div class="hdr-actions">

        
        <div class="dropdown">
            <button class="hdr-icon-btn" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Notificações">
                <i class="fas fa-bell"></i>
                <?php if(isset($notificacoesCount) && $notificacoesCount > 0): ?>
                    <span class="hdr-badge"><?php echo e($notificacoesCount > 9 ? '9+' : $notificacoesCount); ?></span>
                <?php endif; ?>
            </button>
            <ul class="dropdown-menu dropdown-menu-end shadow" style="min-width: 320px;">
                <li class="px-3 py-2 border-bottom">
                    <strong class="fw-600"><i class="fas fa-bell me-2"></i>Notificações</strong>
                </li>
                <?php $__empty_1 = true; $__currentLoopData = $notificacoes ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notif): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <li>
                        <a class="dropdown-item py-2" href="<?php echo e($notif['url'] ?? '#'); ?>">
                            <div class="fw-600 fs-sm"><?php echo e($notif['titulo'] ?? 'Notificação'); ?></div>
                            <div class="text-muted fs-xs"><?php echo e($notif['tempo'] ?? 'Agora'); ?></div>
                        </a>
                    </li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <li class="px-3 py-3 text-center text-muted">
                        <i class="fas fa-bell-slash d-block mb-1" style="font-size: 1.4rem;"></i>
                        <span class="fs-sm">Sem notificações</span>
                    </li>
                <?php endif; ?>
                <?php if(!empty($notificacoes)): ?>
                    <li class="border-top">
                        <a class="dropdown-item text-center fs-sm py-2 text-danger" href="#">
                            <i class="fas fa-eye me-1"></i> Ver todas
                        </a>
                    </li>
                <?php endif; ?>
            </ul>
        </div>

        
        <div class="dropdown">
            <button class="hdr-user" type="button" id="userMenuBtn" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Menu do utilizador">
                <?php if(!empty(Auth::user()->avatar)): ?>
                    <img src="<?php echo e(asset('storage/' . Auth::user()->avatar)); ?>"
                         alt="<?php echo e(Auth::user()->name); ?>"
                         class="hdr-avatar">
                <?php else: ?>
                    <div class="hdr-avatar-text">
                        <?php echo e(strtoupper(substr(Auth::user()->name ?? 'U', 0, 1))); ?>

                    </div>
                <?php endif; ?>
                <span class="hdr-username"><?php echo e(Auth::user()->name ?? 'Utilizador'); ?></span>
                <i class="fas fa-chevron-down ms-1" style="font-size: 0.7rem; color: var(--text-muted);"></i>
            </button>
            <ul class="dropdown-menu dropdown-menu-end shadow" aria-labelledby="userMenuBtn">
                <li class="px-3 py-2 border-bottom">
                    <div class="fw-700"><i class="fas fa-user-circle me-2"></i><?php echo e(Auth::user()->name ?? 'Utilizador'); ?></div>
                    <div class="text-muted fs-xs"><i class="fas fa-envelope me-1"></i><?php echo e(Auth::user()->email ?? ''); ?></div>
                </li>
                <li><hr class="dropdown-divider"></li>
                <li>
                    <a class="dropdown-item" href="<?php echo e(route('sistema.configuracoes')); ?>">
                        <i class="fas fa-user me-2"></i>O meu Perfil
                    </a>
                </li>
                <li>
                    <a class="dropdown-item" href="<?php echo e(route('sistema.configuracoes')); ?>">
                        <i class="fas fa-cog me-2"></i>Configurações
                    </a>
                </li>
                <li><hr class="dropdown-divider"></li>
                <li>
                    <form method="POST" action="<?php echo e(route('logout')); ?>">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="dropdown-item text-danger">
                            <i class="fas fa-sign-out-alt me-2"></i>Terminar sessão
                        </button>
                    </form>
                </li>
            </ul>
        </div>

    </div>
</header>
<?php /**PATH /var/www/html/resources/views/admin/partials/header.blade.php ENDPATH**/ ?>