<?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\Checkout\Payment\Method\PUIHandler"
                 parent="Swag\PayPal\Checkout\Payment\Method\AbstractPaymentMethodHandler">
            <argument type="service" id="Swag\PayPal\OrdersApi\Builder\PUIOrderBuilder"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\Service\PUICustomerDataService"/>
            <tag name="shopware.payment.method"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\Service\PUICustomerDataService">
            <argument type="service" id="order_address.repository"/>
            <argument type="service" id="customer.repository"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\Service\PUIFraudNetDataService">
            <argument type="service" id="Swag\PayPal\Util\Lifecycle\Method\PaymentMethodDataRegistry"/>
            <argument type="service" id="Swag\PayPal\Setting\Service\CredentialsUtil"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\SalesChannel\PUIPaymentInstructionsRoute" public="true">
            <argument type="service" id="order_transaction.repository"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\Service\PUIInstructionsFetchService"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\Service\PUIPaymentInstructionDataService">
            <argument type="service" id="Swag\PayPal\Util\Lifecycle\Method\PaymentMethodDataRegistry"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\SalesChannel\PUIPaymentInstructionsRoute"/>
            <argument type="service" id="router"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\Service\PUIInstructionsFetchService">
            <argument type="service" id="order_transaction.repository"/>
            <argument type="service" id="Swag\PayPal\RestApi\V2\Resource\OrderResource"/>
            <argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler" />
            <argument type="service" id="Swag\PayPal\Checkout\Payment\Service\TransactionDataService" />
        </service>

        <service id="Swag\PayPal\Checkout\PUI\PUISubscriber">
            <argument type="service" id="Swag\PayPal\Setting\Service\SettingsValidationService"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\Service\PUIFraudNetDataService"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\Service\PUIPaymentInstructionDataService"/>
            <argument type="service" id="monolog.logger.paypal"/>
            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\ScheduledTask\PUIInstructionsFetchTask">
            <tag name="shopware.scheduled.task"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\ScheduledTask\PUIInstructionsFetchTaskHandler">
            <argument type="service" id="scheduled_task.repository"/>
            <argument type="service" id="logger"/>
            <argument type="service" id="order_transaction.repository"/>
            <argument type="service" id="Swag\PayPal\Util\Lifecycle\Method\PaymentMethodDataRegistry"/>
            <argument type="service" id="messenger.default_bus"/>
            <tag name="messenger.message_handler"/>
        </service>

        <service id="Swag\PayPal\Checkout\PUI\MessageQueue\PUIInstructionsFetchMessageHandler">
            <argument type="service" id="order_transaction.repository"/>
            <argument type="service" id="Swag\PayPal\Checkout\PUI\Service\PUIInstructionsFetchService"/>
            <tag name="messenger.message_handler" />
        </service>
    </services>
</container>
