<?php

namespace App\Notifications;

use App\Models\EventRegistration;

class EventRegistrationWaitlistedNotification extends ArenaDatabaseNotification
{
    public function __construct(public EventRegistration $registration) {}

    public function toArray(object $notifiable): array
    {
        return $this->payload(
            'notifications.waitlisted.title',
            'notifications.waitlisted.message',
            [
                'event' => $this->registration->event->title,
                'position' => $this->registration->waitlist_position ?? '-',
            ],
            route('registrations.show', $this->registration),
            'bi-hourglass-split',
        );
    }
}
