<?php

namespace ContainerH4AHLTQ;

use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;

/*
 * @internal This class has been auto-generated by the Symfony Dependency Injection Component.
 */
class getSendBusinessEventToWebhooksService extends KernelProdContainer
{
    /*
     * Gets the private 'Akeneo\Connectivity\Connection\Infrastructure\Webhook\Command\SendBusinessEventToWebhooks' shared service.
     *
     * @return \Akeneo\Connectivity\Connection\Infrastructure\Webhook\Command\SendBusinessEventToWebhooks
     */
    public static function do($container, $lazyLoad = true)
    {
        include_once \dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Infrastructure/Webhook/Command/SendBusinessEventToWebhooks.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Application/Webhook/Command/SendBusinessEventToWebhooksHandler.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Application/Webhook/WebhookUserAuthenticator.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Domain/Webhook/Client/WebhookClientInterface.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Infrastructure/Webhook/Client/GuzzleWebhookClient.php';
        include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/EncoderInterface.php';
        include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/DecoderInterface.php';
        include_once \dirname(__DIR__, 4).'/vendor/symfony/serializer/Encoder/JsonEncoder.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Application/Webhook/Service/Logger/SendApiEventRequestLogger.php';
        include_once \dirname(__DIR__, 4).'/vendor/akeneo/pim-community-dev/src/Akeneo/Connectivity/Connection/back/Application/Webhook/WebhookEventBuilder.php';

        $a = ($container->services['monolog.logger.event_api'] ?? $container->load('getMonolog_Logger_EventApiService'));
        $b = ($container->privates['Akeneo\\Connectivity\\Connection\\Application\\Webhook\\Service\\EventsApiDebugLogger'] ?? $container->load('getEventsApiDebugLoggerService'));
        $c = ($container->services['event_dispatcher'] ?? $container->getEventDispatcherService());

        $container->privates['Akeneo\\Connectivity\\Connection\\Infrastructure\\Webhook\\Command\\SendBusinessEventToWebhooks'] = $instance = new \Akeneo\Connectivity\Connection\Infrastructure\Webhook\Command\SendBusinessEventToWebhooks(($container->privates['Akeneo\\Platform\\Component\\EventQueue\\BulkEventNormalizer'] ?? $container->load('getBulkEventNormalizerService')), new \Akeneo\Connectivity\Connection\Application\Webhook\Command\SendBusinessEventToWebhooksHandler(($container->privates['Akeneo\\Connectivity\\Connection\\Infrastructure\\Webhook\\Persistence\\DbalSelectActiveWebhooksQuery'] ?? $container->load('getDbalSelectActiveWebhooksQueryService')), new \Akeneo\Connectivity\Connection\Application\Webhook\WebhookUserAuthenticator(($container->privates['pim_user.repository.user'] ?? $container->load('getPimUser_Repository_UserService')), ($container->services['.container.private.security.token_storage'] ?? $container->get_Container_Private_Security_TokenStorageService())), new \Akeneo\Connectivity\Connection\Infrastructure\Webhook\Client\GuzzleWebhookClient(($container->privates['akeneo_connectivity.connection.webhook.guzzle_client'] ?? $container->load('getAkeneoConnectivity_Connection_Webhook_GuzzleClientService')), new \Symfony\Component\Serializer\Encoder\JsonEncoder(), new \Akeneo\Connectivity\Connection\Application\Webhook\Service\Logger\SendApiEventRequestLogger($a), $b, $c, ['concurrency' => 5, 'timeout' => 0.5]), new \Akeneo\Connectivity\Connection\Application\Webhook\WebhookEventBuilder(new RewindableGenerator(function () use ($container) {
            yield 0 => ($container->privates['pim_catalog.webhook.event_data_builder.product_created_and_updated'] ?? $container->load('getPimCatalog_Webhook_EventDataBuilder_ProductCreatedAndUpdatedService'));
            yield 1 => ($container->privates['pim_catalog.webhook.event_data_builder.product_removed'] ?? ($container->privates['pim_catalog.webhook.event_data_builder.product_removed'] = new \Akeneo\Pim\Enrichment\Component\Product\Webhook\ProductRemovedEventDataBuilder()));
            yield 2 => ($container->privates['pim_catalog.webhook.event_data_builder.product_model_created_and_updated'] ?? $container->load('getPimCatalog_Webhook_EventDataBuilder_ProductModelCreatedAndUpdatedService'));
            yield 3 => ($container->privates['pim_catalog.webhook.event_data_builder.product_model_removed'] ?? ($container->privates['pim_catalog.webhook.event_data_builder.product_model_removed'] = new \Akeneo\Pim\Enrichment\Component\Product\Webhook\ProductModelRemovedEventDataBuilder()));
        }, 4), $b), $a, $b, $container->getEnv('AKENEO_PIM_URL')), $c, ($container->privates['monolog.logger'] ?? $container->load('getMonolog_LoggerService')));

        $instance->setName('akeneo:connectivity:send-business-event');
        $instance->setDescription('Send business event to webhooks');

        return $instance;
    }
}
