<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Bridge\Symfony\Bundle;

use CpCreation\VitiCore\Bridge\Symfony\Bundle\DependencyInjection\Compiler\CarrierProviderPass;
use CpCreation\VitiCore\Bridge\Symfony\Bundle\DependencyInjection\Compiler\AuditorCommandPass;
use CpCreation\VitiCore\Bridge\Symfony\Bundle\DependencyInjection\Compiler\PaymentMethodPass;
use CpCreation\VitiCore\Bridge\Symfony\Bundle\DependencyInjection\Compiler\PaymentProviderPass;
use CpCreation\VitiCore\Bridge\Symfony\Bundle\DependencyInjection\Compiler\SocialNetworkProviderPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class CpCreationVitiCoreBundle extends Bundle
{
    public function build(ContainerBuilder $container): void
    {
        parent::build($container);

        $container->addCompilerPass(new AuditorCommandPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1000);
        $container->addCompilerPass(new PaymentMethodPass());
        $container->addCompilerPass(new PaymentProviderPass());
        $container->addCompilerPass(new SocialNetworkProviderPass());
        $container->addCompilerPass(new CarrierProviderPass());
    }
}
