@php
use Filament\Support\Enums\Alignment;
use Filament\Support\View\ComponentAttributeBag as FilamentComponentAttributeBag;
use Filament\Support\View\Components\BadgeComponent;
$notifications = $this->getNotifications();
$unreadNotificationsCount = $this->getUnreadNotificationsCount();
$hasNotifications = $notifications->count();
$isPaginated = $notifications instanceof \Illuminate\Contracts\Pagination\Paginator && $notifications->hasPages();
$pollingInterval = $this->getPollingInterval();
@endphp
{{-- The focus trap autofocuses the modal window itself when the slide-over opens, since the first tabbable element is the `Mark all as read` header action, which `Enter` would otherwise immediately (and irreversibly) trigger. The window must carry the `autofocus` attribute because the focus trap resolves it once, when the modal first initializes, and the window is always rendered. --}}
@if ($trigger = $this->getTrigger())
{{ $trigger->with(['unreadNotificationsCount' => $unreadNotificationsCount]) }}
@endif
@if ($hasNotifications)
{{ __('filament-notifications::database.modal.heading') }}
@if ($unreadNotificationsCount)
color(BadgeComponent::class, 'primary')->class([
'fi-badge fi-size-xs',
])
}}
>
{{ $unreadNotificationsCount }}
@endif
@if ($unreadNotificationsCount && $this->markAllNotificationsAsReadAction?->isVisible())
{{ $this->markAllNotificationsAsReadAction }}
@endif
@if ($this->clearNotificationsAction?->isVisible())
{{ $this->clearNotificationsAction }}
@endif
@foreach ($notifications as $notification)
! $notification->unread(),
'fi-no-notification-unread-ctn' => $notification->unread(),
])
>
@if ($notification->unread())
{{ __('filament-notifications::database.modal.unread_label') }}
@endif
{{ $this->getNotification($notification)->inline() }}
@endforeach
@if ($broadcastChannel = $this->getBroadcastChannel())
@script
@endscript
@endif
@if ($isPaginated)
@endif
@endif