@php
use App\Services\NotificationService;
$notificationService = app(NotificationService::class);
$counts = $notificationService->getCounts();
$unreadCount = $counts['unread'];
@endphp
@if($unreadCount > 0)
{{ $unreadCount > 99 ? '99+' : $unreadCount }}
@endif
@php
function getCategoryIcon($type) {
return match($type) {
'agreement_expiring' => 'ri-file-text-line',
'rent_due' => 'ri-calendar-line',
'rent_overdue' => 'ri-alert-line',
'deposit_low' => 'ri-money-dollar-circle-line',
'student_pending' => 'ri-user-add-line',
default => 'ri-notification-line',
};
}
function getCategoryClass($type) {
return match($type) {
'rent_overdue', 'deposit_low' => 'bg-label-danger',
'agreement_expiring', 'rent_due', 'student_pending' => 'bg-label-warning',
default => 'bg-label-secondary',
};
}
@endphp