services:
  _defaults:
    public: true

  PrestaShop\PrestaShop\Adapter\Product\Pack\Repository\ProductPackRepository:
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'

  PrestaShop\PrestaShop\Adapter\Product\Pack\Update\ProductPackUpdater:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\Product\Pack\CommandHandler\SetPackProductsHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Pack\Update\ProductPackUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Pack\Command\SetPackProductsCommand

  PrestaShop\PrestaShop\Adapter\Product\Pack\CommandHandler\RemoveAllProductsFromPackHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Pack\Update\ProductPackUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Pack\Command\RemoveAllProductsFromPackCommand

  PrestaShop\PrestaShop\Adapter\Product\Pack\QueryHandler\GetPackedProductsHandler:
    autowire: true
    public: false
    arguments:
      $defaultLangId: '@=service("prestashop.adapter.legacy.context").getContext().language.id'
      $translator: '@translator'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Pack\Query\GetPackedProducts
