<?php

declare(strict_types=1);

namespace Paysera\CheckoutSdk\Service\Validator;

use Paysera\CheckoutSdk\Entity\CallbackEventInterface;
use Paysera\CheckoutSdk\Entity\PaymentCallback\Event;

class CallbackEventValidator
{
    public const SUPPORTED_EVENTS = [
        Event::TYPE_ORDER => [Event::NAME_AMOUNT_PAID_UPDATED => true],
    ];

    public function isSupported(CallbackEventInterface $event): bool
    {
        return self::SUPPORTED_EVENTS[$event->getType()][$event->getName()] ?? false;
    }
}
