services:
  _defaults:
    autowire: true
    autoconfigure: true

  AutoAdmin\Bundle\Admin\Security\AdminCustomAuthenticator:
    arguments:
      - '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
      - '@Symfony\Component\Security\Core\Security'

  AutoAdmin\Bundle\Admin\Command\Admin\CreateAdministratorCommand:
    tags: [ 'console.command' ]

  AutoAdmin\Bundle\Admin\Command\Admin\AllowAdministratorCommand:
    arguments:
      - '@Doctrine\Persistence\ManagerRegistry'
    tags: [ 'console.command' ]

  AutoAdmin\Bundle\Admin\Command\Admin\AdministratorRoleUpdateCommand:
    arguments:
      - '@Doctrine\Persistence\ManagerRegistry'
    tags: [ 'console.command' ]

  AutoAdmin\Bundle\Admin\Command\Admin\ChangeAdministratorPasswordCommand:
    arguments:
      - '@AutoAdmin\Bundle\Admin\Service\AdministratorManager'
    tags: [ 'console.command' ]

  AutoAdmin\Bundle\Admin\Factory\BuilderFactory:
    public: true
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'
      - '@AutoAdmin\Bundle\Admin\Helper\EntityHelper'
      - '@AutoAdmin\Bundle\Admin\Router\AdminRouter'
      - '@AutoAdmin\Bundle\Admin\Helper\AccessHelper'
      - '@AutoAdmin\Bundle\Admin\Helper\StringifierHelper'
      - '@AutoAdmin\Bundle\Admin\Search\EntitySearchHelper'
      - '@request_stack'

  AutoAdmin\Bundle\Admin\Factory\ContentFactory:
    public: true
    arguments:
      - '@AutoAdmin\Bundle\Content\Translation\EntityTranslator'
      - '@AutoAdmin\Bundle\Admin\Helper\EntityHelper'
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@AutoAdmin\Bundle\Content\Site\SiteContextHelper'

  AutoAdmin\Bundle\Admin\Helper\EntityHelper:
    public: true
    arguments:
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@serializer'

  AutoAdmin\Bundle\Admin\Helper\EntityPrevNextHelper:
    public: true
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@AutoAdmin\Bundle\Admin\Router\AdminRouter'

  AutoAdmin\Bundle\Admin\Finder\EntityFinder:
    public: true
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'

  AutoAdmin\Bundle\Admin\Helper\AccessHelper:
    public: true
    arguments:
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'
      - '@AutoAdmin\Bundle\Admin\Helper\EntityHelper'
      - '@security.authorization_checker'
      - '@security.token_storage'
      - '@request_stack'
      - '@AutoAdmin\Bundle\Content\Site\SiteContextHelper'

  AutoAdmin\Bundle\Admin\Mailer\AdminMailer:
    arguments:
      - '@mailer'
      - '@twig'

  AutoAdmin\Bundle\Admin\Repository\AdministratorRepository:
    tags:
      - 'doctrine.repository_service'
    autowire: true

  AutoAdmin\Bundle\Admin\Router\AdminRouter:
    autowire: true

  AutoAdmin\Bundle\Admin\Service\AdministratorManager:
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@security.password_hasher'

  AutoAdmin\Bundle\Admin\Service\AdministratorResettingService:
    arguments:
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@AutoAdmin\Bundle\Admin\Service\AdministratorManager'
      - '@AutoAdmin\Bundle\Admin\Mailer\AdminMailer'

  AutoAdmin\Bundle\Admin\Security\Voter\AdminAccessVoter:
    public: false
    arguments:
      - '@AutoAdmin\Bundle\Admin\Helper\AccessHelper'
    tags:
      - { name: 'security.voter' }

  AutoAdmin\Bundle\Admin\EventListener\CustomControllerListener:
    arguments:
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'
      - '@controller_resolver'
      - '@AutoAdmin\Bundle\Admin\Helper\AccessHelper'
      - '@AutoAdmin\Bundle\Core\Util\CaseConverter'
    tags:
      - { name: 'kernel.event_listener', event: 'kernel.controller' }

  AutoAdmin\Bundle\Admin\Form\TypeGuesser\TypeGuesserManager:
    arguments:
      - '@AutoAdmin\Bundle\Admin\Attribute\Loader\AttributeLoader'
      - !tagged_iterator aa_admin.type_guesser

  AutoAdmin\Bundle\Admin\Attribute\Loader\AttributeLoader:
    - ~

  AutoAdmin\Bundle\Admin\EventListener\TwigAdminConfigListener:
    arguments:
      - '@twig'
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'
    tags:
      - { name: 'kernel.event_listener', event: 'kernel.controller' }

  AutoAdmin\Bundle\Admin\Helper\StringifierHelper:
    arguments:
      - '@AutoAdmin\Bundle\Admin\Router\AdminRouter'
      - '@AutoAdmin\Bundle\Admin\Configuration\ConfigManager'

  AutoAdmin\Bundle\Admin\Search\EntitySearchHelper:
    arguments:
      - '@form.factory'
      - '@Doctrine\ORM\EntityManagerInterface'
      - '@request_stack'

  AutoAdmin\Bundle\Admin\Routing\RouteLoader:
    public: true
    tags:
      - { name: 'routing.loader' }

  AutoAdmin\Bundle\Admin\Security\AdministratorProvider: ~
