<?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.checkout_address.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.checkout_select_shipping.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.checkout_shipment.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.checkout_select_payment.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.checkout_payment.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
        <parameter key="sylius.form.type.checkout_complete.validation_groups" type="collection">
            <parameter>sylius</parameter>
        </parameter>
    </parameters>

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

        <service id="sylius.form.type.checkout_address" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\AddressType">
            <argument>%sylius.model.order.class%</argument>
            <argument>%sylius.form.type.checkout_address.validation_groups%</argument>
            <argument type="service" id="sylius.address_comparator" />
            <tag name="form.type" />
        </service>
        <service id="sylius.form.type.checkout_select_shipping" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\SelectShippingType">
            <argument>%sylius.model.order.class%</argument>
            <argument>%sylius.form.type.checkout_select_shipping.validation_groups%</argument>
            <tag name="form.type" />
        </service>
        <service id="sylius.form.type.checkout_shipment" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\ShipmentType">
            <argument>%sylius.model.shipment.class%</argument>
            <argument>%sylius.form.type.checkout_shipment.validation_groups%</argument>
            <tag name="form.type" />
        </service>
        <service id="sylius.form.type.checkout_select_payment" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\SelectPaymentType">
            <argument>%sylius.model.order.class%</argument>
            <argument>%sylius.form.type.checkout_select_payment.validation_groups%</argument>
            <tag name="form.type" />
        </service>
        <service id="sylius.form.type.checkout_payment" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\PaymentType">
            <argument>%sylius.model.payment.class%</argument>
            <argument>%sylius.form.type.checkout_payment.validation_groups%</argument>
            <tag name="form.type" />
        </service>
        <service id="sylius.form.type.checkout_complete" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\CompleteType">
            <argument>%sylius.model.order.class%</argument>
            <argument>%sylius.form.type.checkout_complete.validation_groups%</argument>
            <tag name="form.type" />
        </service>
    </services>
</container>
