@extends('layouts.app')

@section('title', 'Notifications')

@section('content')
<div class="container py-4">
    <div class="page-header">
        <h1>Notifications</h1>
    </div>
    <div class="card">
        <div class="card-body">
            @if($notifications->count())
                <ul class="list-group">
                @foreach($notifications as $notification)
                    <li class="list-group-item">
                        {{ $notification->data['message'] ?? 'Notification' }}
                        <span class="text-muted float-end" style="font-size:0.9em;">{{ $notification->created_at->diffForHumans() }}</span>
                    </li>
                @endforeach
                </ul>
            @else
                <p class="mb-0">No notifications.</p>
            @endif
        </div>
    </div>
</div>
@endsection
