@php
$adminUser = Auth::guard('admin')->user();
$nameParts = explode(' ', $adminUser->name ?? 'Admin');
$initials = mb_strtoupper(mb_substr($nameParts[0] ?? 'A', 0, 1))
. mb_strtoupper(mb_substr($nameParts[1] ?? '', 0, 1));
$adminRole = $adminUser->role == 1 ? 'Super Admin' : 'Admin';
$allUnread = App\Models\AdminNotification::unread_notification();
$unreadCount = $allUnread->count();
$notifications = $allUnread->take(6);
// Map type string → destination URL
$notifUrl = function($notif) {
$t = strtolower($notif->type ?? '');
$id = $notif->identity;
if (str_contains($t, 'job')) return $id ? route('admin.job.details', $id) : route('admin.jobs');
if (str_contains($t, 'project')) return $id ? route('admin.project.details', $id) : route('admin.project');
if (str_contains($t, 'deposit')) return moduleExists('Wallet') ? route('admin.wallet.history') : route('admin.notification.all');
if (str_contains($t, 'subscription') || str_contains($t, 'connect')) return moduleExists('Subscription') ? route('admin.subscription.all') : route('admin.notification.all');
if (str_contains($t, 'withdraw')) return moduleExists('Wallet') ? route('admin.wallet.withdraw.request') : route('admin.notification.all');
return route('admin.notification.all');
};
// Map type string → inline SVG icon path(s)
$notifIcon = function($type) {
$t = strtolower($type ?? '');
if (str_contains($t, 'job')) return '