@php $style = [ 'success' => ['check-circle-2', 'text-green-400', 'bg-green-500/10'], 'warning' => ['alert-triangle', 'text-amber-400', 'bg-amber-500/10'], 'error' => ['alert-circle', 'text-red-400', 'bg-red-500/10'], 'info' => ['info', 'text-blue-400', 'bg-blue-500/10'], ]; $typeAction = [ \App\Models\BillingNotification::TYPE_PAYMENT_SUCCESS => ['billing', 'View billing'], \App\Models\BillingNotification::TYPE_INVOICE_READY => ['billing', 'View invoice'], \App\Models\BillingNotification::TYPE_RENEWAL_REMINDER => ['billing', 'Manage plan'], \App\Models\BillingNotification::TYPE_SUBSCRIPTION_EXPIRING => ['billing', 'Renew now'], \App\Models\BillingNotification::TYPE_EXPIRED => ['billing', 'Renew now'], \App\Models\BillingNotification::TYPE_GRACE_REMAINING => ['billing', 'Renew now'], \App\Models\BillingNotification::TYPE_DESKTOP_LOCKED => ['user.devices', 'View devices'], ]; @endphp
{{-- Title row --}}

Notifications

Billing alerts, subscription reminders and system messages.

@if ($counts['unread'] > 0) @endif
{{-- List --}}
@foreach (['all' => 'All', 'unread' => 'Unread'] as $key => $label) @endforeach
@if ($rows->count())
@foreach ($rows as $n) @php([$icon, $text, $bg] = $style[$n->level] ?? $style['info']) @php($action = $typeAction[$n->type] ?? null) @php($unread = $n->read_at === null)
@if ($unread) @endif
{{ $n->title }}
@if ($n->body)

{{ $n->body }}

@endif
{{ $n->created_at->diffForHumans() }} @if ($action) {{ $action[1] }} @endif @if ($unread) @endif
@endforeach
@if ($rows->hasPages())
{{ $rows->links('pagination.dark') }}
@endif @else

{{ $filter === 'unread' ? "You're all caught up" : 'No notifications yet' }}

{{ $filter === 'unread' ? 'Every notification has been read.' : 'Billing and subscription alerts will appear here.' }}

@endif