<?php

declare(strict_types=1);

namespace External\PompoBundle\Overrides\GraphQL\Util;

use KupShop\OrderingBundle\Entity\Purchase\PurchaseState;

class PurchaseUtil extends \KupShop\GraphQLBundle\ApiAdmin\Util\PurchaseUtil
{
    protected function createPurchaseState(): PurchaseState
    {
        $purchaseState = parent::createPurchaseState();

        // pro detekci, ze se jedna o ceneni pres pokladnu aby spravne fungovat trigger ve slevach "Lze uplatnit na pokladne"
        $purchaseState->setCustomData([
            'isPompoApi' => true,
        ]);

        return $purchaseState;
    }
}
