<?php

declare(strict_types=1);

namespace App\Listeners;

use App\Contracts\Services\NotificationServiceInterface;
use App\Events\PaymentVerified;
use Illuminate\Contracts\Queue\ShouldQueue;

final class SendPaymentVerifiedNotification implements ShouldQueue
{
    public function __construct(
        private readonly NotificationServiceInterface $notificationService
    ) {}

    public function handle(PaymentVerified $event): void
    {
        $this->notificationService->paymentVerified($event->transaction);
    }
}
