<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="Swag\PayPal\Setting\SettingsController" public="true">
            <argument type="service" id="Swag\PayPal\Setting\Service\ApiCredentialService"/>
            <argument type="service" id="Swag\PayPal\Setting\Service\MerchantIntegrationsService"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\Validation\SystemConfigValidator"/>
            <argument type="service" id="Swag\PayPal\Setting\Service\SettingsSaver"/>
            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Swag\PayPal\Setting\Service\ApiCredentialService">
            <argument type="service" id="Shopware\PayPalSDK\Contract\Gateway\TokenGatewayInterface"/>
            <argument type="service" id="Shopware\PayPalSDK\Gateway\CustomerGateway"/>
        </service>

        <service id="Swag\PayPal\Setting\Service\CredentialsUtil">
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
        </service>

        <service id="Swag\PayPal\Setting\Service\MerchantIntegrationsService">
            <argument type="service" id="Swag\PayPal\RestApi\V1\Resource\MerchantIntegrationsResource"/>
            <argument type="service" id="Swag\PayPal\RestApi\V1\Resource\TokenResource"/>
            <argument type="service" id="Swag\PayPal\Setting\Service\CredentialsUtil"/>
            <argument type="service" id="Swag\PayPal\Util\Lifecycle\Method\PaymentMethodDataRegistry"/>
        </service>

        <service id="Swag\PayPal\Setting\Service\SettingsValidationService">
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument type="service" id="monolog.logger.paypal"/>
        </service>

        <service id="Swag\PayPal\Setting\Service\SettingsSaver">
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument type="service" id="Swag\PayPal\Setting\Service\ApiCredentialService"/>
            <argument type="service" id="Swag\PayPal\Webhook\Registration\WebhookSystemConfigHelper"/>
        </service>
    </services>
</container>
