services:
  _defaults:
    public: true

  prestashop.core.module.configuration.payment_restrictions_configurator:
    class: PrestaShop\PrestaShop\Core\Module\Configuration\PaymentRestrictionsConfigurator
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'
      - '@=service("prestashop.adapter.legacy.context").getContext().shop.id'
      - '@prestashop.adapter.module.payment_module_provider'

  PrestaShop\PrestaShop\Core\Module\ModuleRepository:
    public: false
    lazy: true
    arguments:
      - '@prestashop.adapter.data_provider.module'
      - '@prestashop.adapter.admin.data_provider.module'
      - '@doctrine.cache.provider'
      - '@PrestaShop\PrestaShop\Adapter\HookManager'
      - "@=service('prestashop.adapter.legacy.configuration').get('_PS_MODULE_DIR_')"
      - '@=service("prestashop.adapter.legacy.context").getContext().language.id'

  prestashop.core.admin.module.repository.eventsubscriber:
    class: PrestaShop\PrestaShop\Core\Module\EventSubscriber
    arguments:
      - '@prestashop.core.admin.module.repository'
      - '@prestashop.adapter.cache.clearer.symfony_cache_clearer'
    tags:
      - { name: kernel.event_subscriber }

  PrestaShop\PrestaShop\Core\Module\ModuleManager:
    public: false
    autowire: true
    arguments:
      $moduleDataProvider: '@prestashop.adapter.data_provider.module'
      $adminModuleDataProvider: '@prestashop.core.admin.data_provider.module_interface'
      $hookManager: '@prestashop.adapter.hook.manager'

  PrestaShop\PrestaShop\Core\Module\SourceHandler\ZipSourceHandler:
    autowire: true
    public: false
    arguments:
      $modulePath: '%modules_dir%'
    tags: [ core.module.source_handler ]

  PrestaShop\PrestaShop\Core\Module\SourceHandler\RemoteZipSourceHandler:
    autowire: true
    public: false
    arguments:
      $downloadDir: '%ps_cache_dir%/downloads'
    tags: [ core.module.source_handler ]

  PrestaShop\PrestaShop\Core\Module\SourceHandler\SourceHandlerFactory:
    arguments:
      - !tagged core.module.source_handler

  prestashop.core.admin.module.repository:
    alias: PrestaShop\PrestaShop\Core\Module\ModuleRepository
    public: true
    deprecated: ~

  prestashop.module.factory.sourcehandler:
    alias: PrestaShop\PrestaShop\Core\Module\SourceHandler\SourceHandlerFactory
    public: true
    deprecated: ~

  prestashop.module.sourcehandler.zip:
    alias: PrestaShop\PrestaShop\Core\Module\SourceHandler\ZipSourceHandler
    public: true
    deprecated: ~

  prestashop.module.manager:
    alias: PrestaShop\PrestaShop\Core\Module\ModuleManager
    public: true
    deprecated: ~
