services:
    oro_case.form.type.entity:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseEntityType
        tags:
            - { name: form.type, alias: oro_case_entity }

    oro_case.form.type.entity.api:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseEntityApiType
        tags:
            - { name: form.type, alias: oro_case_entity_api }

    oro_case.form.type.comment:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseCommentType
        tags:
            - { name: form.type, alias: oro_case_comment }

    oro_case.form.type.comment.api:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseCommentApiType
        tags:
            - { name: form.type, alias: oro_case_comment_api }

    oro_case.form.type.case_mailbox_process:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseMailboxProcessSettingsType
        tags:
            - { name: form.type, alias: oro_case_mailbox_process_settings }

    oro_case.form.entity:
        class: Symfony\Component\Form\Form
        public: true
        factory: ['@form.factory', createNamed]
        arguments:
            - 'oro_case_entity_form'
            - Oro\Bundle\CaseBundle\Form\Type\CaseEntityType

    oro_case.form.entity.api:
        class: Symfony\Component\Form\Form
        public: true
        factory: ['@form.factory', createNamed]
        arguments:
            - 'case'
            - Oro\Bundle\CaseBundle\Form\Type\CaseEntityApiType

    oro_case.form.comment:
        class: Symfony\Component\Form\Form
        public: true
        factory: ['@form.factory', createNamed]
        arguments:
            - 'oro_case_comment_form'
            - Oro\Bundle\CaseBundle\Form\Type\CaseCommentType

    oro_case.form.comment.api:
        class: Symfony\Component\Form\Form
        public: true
        factory: ['@form.factory', createNamed]
        arguments:
            - 'comment'
            - Oro\Bundle\CaseBundle\Form\Type\CaseCommentApiType

    oro_case.form.handler.entity:
        class: Oro\Bundle\CaseBundle\Form\Handler\CaseEntityHandler
        public: true
        arguments:
            - "@oro_case.form.entity"
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@event_dispatcher"

    oro_case.form.handler.entity.api:
        class: Oro\Bundle\CaseBundle\Form\Handler\CaseEntityHandler
        public: true
        arguments:
            - "@oro_case.form.entity.api"
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@event_dispatcher"

    oro_case.form.handler.comment:
        class: Oro\Bundle\CaseBundle\Form\Handler\CaseEntityHandler
        public: true
        arguments:
            - "@oro_case.form.comment"
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@event_dispatcher"

    oro_case.form.handler.comment.api:
        class: Oro\Bundle\CaseBundle\Form\Handler\CaseEntityHandler
        public: true
        arguments:
            - "@oro_case.form.comment.api"
            - "@request_stack"
            - "@doctrine.orm.entity_manager"
            - "@event_dispatcher"

    oro_case.form.type.case_mailbox_process_settings_tag:
        class: Oro\Bundle\CaseBundle\Form\Type\CaseMailboxProcessSettingsTagType
        arguments:
            - "@oro_tag.form.subscriber.tag_select"
            - "@oro_case.form.subscriber.case_mailbox_process_settings_tag_subscriber"
        tags:
            - { name: form.type, alias: case_mailbox_process_settings_tag }

    oro_case.form.subscriber.case_mailbox_process_settings_tag_subscriber:
        class: Oro\Bundle\CaseBundle\Form\EventSubscriber\CaseMailboxProcessSettingsTagSubscriber
        parent: oro_tag.form.subscriber.tag_select
