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

    d2_cargoworks_definition_manager:
        class:          D2\CargoWorksBundle\DependencyInjection\Services\CargoWorksDefinitionManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

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

    d2_cargoworks_partner_brk_manager:
        class:          D2\CargoWorksBundle\DependencyInjection\Services\BRK\BRKPartnerManager
        arguments:      [@service_container, @doctrine.orm.entity_manager]

    d2_cargoworks_waybill_manager:
        class:          D2\CargoWorksBundle\DependencyInjection\Services\WaybillManager
        arguments:      [@service_container, @doctrine.orm.entity_manager, @d2_cargoworks_service_definition_manager, @d2_calc_manager]

    d2_cargoworks_bundle.twig.cargoworks_extension:
        class:          D2\CargoWorksBundle\Twig\CargoWorksTwigExtension
        arguments:      [@doctrine, @service_container, @d2_cargoworks_partner_file_manager, @d2_cargoworks_service_definition_manager]
        tags:
            - { name: twig.extension }

    # With Selected Extensions
    d2_cargoworks_bundle.waybill_with_selected.extension:
        class:          D2\CargoWorksBundle\DependencyInjection\Services\WaybillsWithSelectedExtension
        arguments:      [@doctrine, @service_container]
        tags:
            - { name: d2.with_selected, alias: cargoworks_list }
            - { name: d2.with_selected, alias: cargoworks_waybill }
