@if($notifications->where('is_read', false)->count() > 0)
@endif
@forelse($notifications as $notif)
@php
$icon = 'info';
$bgColor = 'bg-info-container text-on-info-container';
if ($notif->type === 'promo') {
$icon = 'sell';
$bgColor = 'bg-primary/10 text-primary';
} elseif ($notif->type === 'transaction') {
$icon = 'local_shipping';
$bgColor = 'bg-secondary-container text-on-secondary-container';
} elseif ($notif->type === 'info') {
$icon = 'info';
$bgColor = 'bg-tertiary-container text-on-tertiary-container';
} elseif ($notif->type === 'system') {
$icon = 'campaign';
$bgColor = 'bg-surface-container-highest text-on-surface';
}
@endphp
@if(!$notif->is_read)
@endif
@empty
{{ $icon }}
{{ $notif->title }}
{{ $notif->message }}
{{ $notif->created_at->diffForHumans() }}
notifications_off
@endforelse
Belum ada notifikasi