<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiAdmin\Controller;

use KupShop\GraphQLBundle\ApiAdmin\Types\Collection\PaymentCollection;
use KupShop\GraphQLBundle\ApiAdmin\Util\PaymentUtil;
use TheCodingMachine\GraphQLite\Annotations\Query;

class PaymentController
{
    private PaymentUtil $paymentUtil;

    public function __construct(PaymentUtil $paymentUtil)
    {
        $this->paymentUtil = $paymentUtil;
    }

    /**
     * Seznam plateb.
     *
     * @Query()
     */
    public function payments(): PaymentCollection
    {
        return $this->paymentUtil->getPayments();
    }
}
