services:
    d2_rtt_service_definition_manager:
        class:          D2\RTTBundle\DependencyInjection\Services\ServiceDefinitionManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_rtt_partner_file_manager:
        class:          D2\RTTBundle\DependencyInjection\Services\PartnerFileManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_rtt_waybill_manager:
        class:          D2\RTTBundle\DependencyInjection\Services\WaybillManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_rtt_service_definition_manager, @d2_calc_manager]

    d2_rtt_linehaul_manager:
        class:          D2\RTTBundle\DependencyInjection\Services\LineHaulManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_rtt_service_definition_manager, @d2_calc_manager]

    d2_rtt_bundle.twig.rtt_extension:
        class:          D2\RTTBundle\Twig\RTTTwigExtension
        arguments:      [@doctrine, @service_container, @d2_rtt_partner_file_manager, @d2_rtt_service_definition_manager]
        tags:
            - { name: twig.extension }

    # With Selected Extensions
    d2_rtt_bundle.waybill_with_selected.extension:
        class:          D2\RTTBundle\DependencyInjection\Services\WaybillsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: rtt_list }
            - { name: d2.with_selected, alias: rtt_waybill }

    # With Selected Extensions
    d2_rtt_bundle.debit_with_selected.extension:
        class:          D2\RTTBundle\DependencyInjection\Services\DebitsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: rtt_debit_list }
            - { name: d2.with_selected, alias: rtt_debit }
