<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiAdmin\Changes\ChangeExtension;

use KupShop\GraphQLBundle\ApiAdmin\Types\Changes\ChangeInterface;
use KupShop\KafkaBundle\DBChanges\MessageTypes\DBGenericMessage;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;

#[AutoconfigureTag(self::CHANGE_EXTENSION_SERVICE_TAG)]
interface ChangeExtensionInterface
{
    public const CHANGE_EXTENSION_SERVICE_TAG = 'kupshop.graphql.change-extension';

    public function createChange(DBGenericMessage $message): ChangeInterface;

    public function didChange(DBGenericMessage $message): bool;

    /**
     * @param array<ChangeInterface> $changes
     *
     * @return array<ChangeInterface>
     */
    public function addChange(array $changes, ChangeInterface $change): array;
}
