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

        <!-- Locale Providers -->
        <service id="a2lix_translation_form.locale.simple_provider" class="A2lix\TranslationFormBundle\Locale\SimpleProvider"></service>

        <!-- Form Listeners -->
        <service id="a2lix_translation_form.form.event_listener.translations_listener" class="A2lix\TranslationFormBundle\Form\EventListener\TranslationsListener">
            <argument type="service" id="a2lix_auto_form.manipulator.default"/>
        </service>

        <service id="a2lix_translation_form.form.event_listener.translations_form_listener" class="A2lix\TranslationFormBundle\Form\EventListener\TranslationsFormsListener"></service>

        <!-- Form Types -->
        <service id="a2lix_translation_form.form.type.translations_type" class="A2lix\TranslationFormBundle\Form\Type\TranslationsType">
            <argument type="service" id="a2lix_translation_form.form.event_listener.translations_listener"/>
            <argument type="service" id="a2lix_translation_form.locale_provider.default"/>

            <tag name="form.type"/>
        </service>

        <service id="a2lix_translation_form.form.type.translations_forms_type" class="A2lix\TranslationFormBundle\Form\Type\TranslationsFormsType">
            <argument type="service" id="a2lix_translation_form.form.event_listener.translations_form_listener"/>
            <argument type="service" id="a2lix_translation_form.locale_provider.default"/>

            <tag name="form.type"/>
        </service>

        <service id="a2lix_translation_form.form.type.translations_locales_selector_type" class="A2lix\TranslationFormBundle\Form\Type\TranslationsLocalesSelectorType">
            <argument type="service" id="a2lix_translation_form.locale_provider.default"/>

            <tag name="form.type"/>
        </service>

        <service id="a2lix_translation_form.form.type.translated_entity_type" class="A2lix\TranslationFormBundle\Form\Type\TranslatedEntityType">
            <argument type="service" id="request_stack"/>

            <tag name="form.type"/>
        </service>
    </services>
</container>
