<?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"
>
    <services>
        <defaults public="true" />

        <service id="sylius_mollie.refund.creator.payment_refund_command" class="Sylius\MolliePlugin\Refund\Creator\PaymentRefundCommandCreator">
            <argument type="service" id="sylius.repository.order" />
            <argument type="service" id="sylius_refund.repository.refund" />
            <argument type="service" id="sylius_mollie.refund.units.payment_units_item" />
            <argument type="service" id="sylius_mollie.refund.units.shipment_unit" />
            <argument type="service" id="Sylius\RefundPlugin\Provider\RefundPaymentMethodsProviderInterface" />
            <argument type="service" id="sylius_mollie.provider.divisor"/>
        </service>
        <service id="Sylius\MolliePlugin\Refund\Creator\PaymentRefundCommandCreatorInterface" alias="sylius_mollie.refund.creator.payment_refund_command" />

        <service id="sylius_mollie.refund.creator.order_refund_command" class="Sylius\MolliePlugin\Refund\Creator\OrderRefundCommandCreator">
            <argument type="service" id="sylius.repository.order" />
            <argument type="service" id="sylius_mollie.refund.units.units_item_order" />
            <argument type="service" id="sylius_mollie.refund.units.units_shipment_order" />
            <argument type="service" id="Sylius\RefundPlugin\Provider\RefundPaymentMethodsProviderInterface" />
        </service>
        <service id="Sylius\MolliePlugin\Refund\Creator\OrderRefundCommandCreatorInterface" alias="sylius_mollie.refund.creator.order_refund_command" />
    </services>
</container>
