<?php

namespace App\Notifications;

use App\Models\EventRegistration;

class EventRegistrationRejectedNotification extends ArenaDatabaseNotification
{
    public function __construct(
        public EventRegistration $registration,
        public ?string $reason = null,
    ) {}

    public function toArray(object $notifiable): array
    {
        return $this->payload(
            'notifications.registration_rejected.title',
            'notifications.registration_rejected.message',
            [
                'event' => $this->registration->event->title,
                'reason' => $this->reason ?? __('admin.empty.no_results'),
            ],
            route('registrations.show', $this->registration),
            'bi-x-circle',
        );
    }
}
