<?xml version="1.0" encoding="utf-8" ?>

<!--

 This file is part of the Sylius Mollie Plugin package.

 (c) Sylius Sp. z o.o.

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<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"
>
    <imports>
        <import resource="services/**/*.xml" />

        <import resource="integration/refund-plugin/services.php" />
    </imports>

    <services>
        <service
            id="sylius_mollie.api.payment_configuration_provider.mollie"
            class="Sylius\MolliePlugin\Api\MolliePaymentConfigurationProvider"
        >
            <argument type="service" id="router" />

            <tag name="sylius.api.payment_method_handler" />
        </service>

        <service id="sylius_mollie.refund.guard.mollie_payment_refund" class="Sylius\MolliePlugin\Refund\Guard\PaymentRefundGuard" public="true" >
            <argument>%kernel.bundles%</argument>
        </service>
        <service id="Sylius\MolliePlugin\Refund\Guard\PaymentRefundGuardInterface" alias="sylius_mollie.refund.guard.mollie_payment_refund" />

        <service id="sylius_mollie.refund.guard.order_payment_refund" class="Sylius\MolliePlugin\Refund\Guard\OrderPaymentRefundGuard" public="true" />
        <service id="Sylius\MolliePlugin\Refund\Guard\OrderPaymentRefundGuardInterface" alias="sylius_mollie.refund.guard.order_payment_refund" />
    </services>
</container>
