services:
    _defaults:
        autowire: true
        autoconfigure: true

    chill.main.form.type.translatable.string:
        class: Chill\MainBundle\Form\Type\TranslatableStringFormType
        arguments:
            - "%chill_main.available_languages%"
            #- "%framework.translator.fallback%"
            - "@translator.default"
        tags:
            - { name: form.type, alias: translatable_string }

    Chill\MainBundle\Form\Type\UserLocaleType:
        arguments:
            - "%chill_main.available_languages%"
        tags:
            - { name: form.type }

    chill.main.form.type.select2choice:
        class: Chill\MainBundle\Form\Type\Select2ChoiceType
        tags:
            - {name: form.type, alias: select2_choice}

    chill.main.form.type.select2entity:
        class: Chill\MainBundle\Form\Type\Select2EntityType
        tags:
            - {name: form.type, alias: select2_entity }

    chill.main.form.type.select2country:
        class: Chill\MainBundle\Form\Type\Select2CountryType
        arguments:
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@chill.main.helper.translatable_string"
            - '@Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface'
        tags:
            - { name: form.type, alias: select2_chill_country }

    chill.main.form.type.select2language:
        class: Chill\MainBundle\Form\Type\Select2LanguageType
        arguments:
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@chill.main.helper.translatable_string"
            - '@Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface'
        tags:
            - { name: form.type, alias: select2_chill_language }

    Chill\MainBundle\Form\Type\PickCenterType: ~

    chill.main.form.type.composed_role_scope:
        class: Chill\MainBundle\Form\Type\ComposedRoleScopeType
        arguments:
            - "@chill.main.helper.translatable_string"
            - "@chill.main.role_provider"
        tags:
            - { name: form.type, alias: composed_role_scope }


    chill.main.form.type.postal_code_type:
        class: Chill\MainBundle\Form\Type\PostalCodeType
        arguments:
            - "@chill.main.helper.translatable_string"
            - '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
            - '@Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader'
            - '@Symfony\Contracts\Translation\TranslatorInterface'
        tags:
            - { name: form.type }

    Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader: ~

    chill.main.form.type.export:
        class: Chill\MainBundle\Form\Type\Export\ExportType
        tags:
            - { name: form.type }
        arguments:
            - '@Chill\MainBundle\Export\ExportManager'

    chill.main.form.pick_formatter_type:
        class: Chill\MainBundle\Form\Type\Export\PickFormatterType
        tags:
            - { name: form.type }
        arguments:
            - '@Chill\MainBundle\Export\ExportManager'

    chill.main.form.pick_centers_type:
        class: Chill\MainBundle\Form\Type\Export\PickCenterType
        autowire: true
        autoconfigure: true

    chill.main.form.formatter_type:
        class: Chill\MainBundle\Form\Type\Export\FormatterType
        tags:
            - { name: form.type }
        arguments:
            - '@Chill\MainBundle\Export\ExportManager'

    Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer: ~

    #chill.main.form.advanced_search_type:
    #    class: Chill\MainBundle\Form\AdvancedSearchType
    #    arguments:
    #        - "@chill_main.search_provider"
    #    tags:
    #        - { name: form.type }

    Chill\MainBundle\Form\UserPasswordType:
        arguments:
            $chillLogger: '@monolog.logger.chill'
        tags:
            - { name: form.type }

    Chill\MainBundle\Form\UserType: ~

    Chill\MainBundle\Form\PermissionsGroupType:
        tags:
            - { name: form.type }

    chill.main.form.type.comment:
        class: Chill\MainBundle\Form\Type\CommentType
        arguments:
            - "@security.token_storage"
        tags:
            - { name: form.type }

    Chill\MainBundle\Form\Type\PickAddressType: ~

    Chill\MainBundle\Form\DataTransform\AddressToIdDataTransformer:
        autoconfigure: true
        autowire: true

    Chill\MainBundle\Form\LocationFormType:
        autowire: true
        autoconfigure: true

    Chill\MainBundle\Form\Type\LocationFormType: ~

    Chill\MainBundle\Form\WorkflowStepType: ~

    Chill\MainBundle\Form\WorkflowSignatureMetadataType: ~

    Chill\MainBundle\Form\DataMapper\PrivateCommentDataMapper:
        autowire: true
        autoconfigure: true

    Chill\MainBundle\Form\DataMapper\NotificationFlagDataMapper:
        autowire: true
        autoconfigure: true

    Chill\MainBundle\Form\UserProfileType: ~
    Chill\MainBundle\Form\AbsenceType: ~
    Chill\MainBundle\Form\DataMapper\RegroupmentDataMapper: ~
    Chill\MainBundle\Form\RegroupmentType: ~

    Chill\MainBundle\Form\DataTransformer\IdToLocationDataTransformer: ~
    Chill\MainBundle\Form\DataTransformer\IdToUserDataTransformer: ~
    Chill\MainBundle\Form\DataTransformer\IdToUsersDataTransformer: ~

    Chill\MainBundle\Form\SavedExportType: ~
