{{--
    İsteğe bağlı üst bar entegrasyonu:
    resources/views/elements/header.blade.php veya Vora üst menü dosyasında uygun sağ menü alanına eklenebilir.
--}}
@php
    try {
        $dwNotificationService = app(\App\Services\Notifications\NotificationCenterService::class);
        $dwHeaderNotifications = $dwNotificationService->recent(8);
        $dwUnreadNotificationCount = $dwNotificationService->unreadCount();
    } catch (\Throwable $e) {
        $dwHeaderNotifications = collect();
        $dwUnreadNotificationCount = 0;
    }
@endphp
<li class="nav-item dropdown notification_dropdown">
    <a class="nav-link bell dz-theme-mode" href="javascript:void(0);" data-toggle="dropdown" aria-label="Bildirimler">
        <i class="flaticon-381-bell"></i>
        @if($dwUnreadNotificationCount > 0)
            <span class="badge light text-white bg-danger rounded-circle">{{ $dwUnreadNotificationCount > 99 ? '99+' : $dwUnreadNotificationCount }}</span>
        @endif
    </a>
    @include('admin.notifications.dropdown', ['notifications' => $dwHeaderNotifications, 'unreadCount' => $dwUnreadNotificationCount])
</li>
