services:
    _defaults:
        autoconfigure: true

    Contao\ManagerBundle\HttpKernel\JwtManager: '@contao_manager.jwt_manager'

    contao_manager.cache.clear_bundle:
        class: Contao\ManagerBundle\Cache\BundleCacheClearer
        arguments:
            - '@?filesystem'

    Contao\ManagerBundle\Controller\DebugController:
        arguments:
            - '@security.helper'
            - '@request_stack'
            - '@contao_manager.jwt_manager'
        public: true

    # Backwards compatibility
    contao_manager.controller.debug:
        alias: Contao\ManagerBundle\Controller\DebugController
        deprecated: Using the "%alias_id%" service ID has been deprecated and will no longer work in Contao 5.0. Please use "Contao\ManagerBundle\Controller\DebugController" instead.
        public: true

    contao_manager.jwt_manager:
        public: true
        synthetic: true

    contao_manager.plugin_loader:
        public: true
        synthetic: true

    contao_manager.routing_loader:
        class: Contao\ManagerBundle\Routing\RouteLoader
        arguments:
            - '@routing.loader'
            - '@contao_manager.plugin_loader'
            - '@kernel'
            - '%kernel.project_dir%'
        public: true

    contao_manager.security.logout_handler:
        class: Contao\ManagerBundle\Security\Logout\LogoutHandler
        arguments:
            - '@?contao_manager.jwt_manager'

    contao_manager.twig.file_extension_filter_iterator:
        class: Contao\ManagerBundle\Twig\FileExtensionFilterIterator
        decorates: twig.template_iterator
        arguments:
            - '@contao_manager.twig.file_extension_filter_iterator.inner'
