<?php

namespace App\Notifications;

use App\Models\EventRegistration;

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

    public function toArray(object $notifiable): array
    {
        $event = $this->registration->event;
        $amount = number_format(($event->fee_amount_minor ?? 0) / 100, 2);

        return $this->payload(
            'notifications.payment_required.title',
            'notifications.payment_required.message',
            [
                'event' => $event->title,
                'amount' => $amount,
                'currency' => $event->currency ?? 'USD',
            ],
            route('registrations.payment-proof.create', $this->registration),
            'bi-credit-card',
        );
    }
}
