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

<!--

 This file is part of the Sylius 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">
    <parameters>
        <parameter key="sylius.form.type.payment.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.payment_method.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.payment_method_translation.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
    </parameters>

    <services>
        <defaults public="true" />

        <service id="sylius.form.type.payment" class="Sylius\Bundle\PaymentBundle\Form\Type\PaymentType">
            <argument>%sylius.model.payment.class%</argument>
            <argument>%sylius.form.type.payment.validation_groups%</argument>
            <tag name="form.type" />
        </service>

        <service id="sylius.form.type.payment_method" class="Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodType">
            <argument>%sylius.model.payment_method.class%</argument>
            <argument>%sylius.form.type.payment_method.validation_groups%</argument>
            <tag name="form.type" />
        </service>

        <service id="sylius.form.type.payment_method_translation" class="Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodTranslationType">
            <argument>%sylius.model.payment_method_translation.class%</argument>
            <argument>%sylius.form.type.payment_method_translation.validation_groups%</argument>
            <tag name="form.type" />
        </service>

        <service id="sylius.form.type.payment_method_choice" class="Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodChoiceType">
            <argument type="service" id="sylius.payment_methods_resolver" />
            <argument type="service" id="sylius.repository.payment_method" />
            <tag name="form.type" />
        </service>

        <service id="sylius.form.type.payment_gateway_choice" class="Sylius\Bundle\PaymentBundle\Form\Type\PaymentGatewayChoiceType">
            <argument>%sylius.payment_gateways%</argument>
            <tag name="form.type" />
        </service>
    </services>
</container>
