services:
  _defaults:
    public: true

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\GenerateProductCombinationsHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Create\CombinationCreator'
      - '@PrestaShop\PrestaShop\Adapter\Product\Update\ProductSupplierUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\GenerateProductCombinationsCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationHandler:
    autowire: true
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationStockAvailableHandler:
    autowire: true
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationStockAvailableCommand

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

  PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\GetEditableCombinationsListHandler:
    autowire: true
    public: false
    arguments:
      $combinationQueryBuilder: '@PrestaShop\PrestaShop\Core\Grid\Query\ProductCombinationQueryBuilder'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetEditableCombinationsList

  PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\SearchCombinationsForAssociationHandler:
    autowire: true
    public: false
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\SearchCombinationsForAssociation

  PrestaShop\PrestaShop\Adapter\Product\Combination\Validate\CombinationValidator: ~

  PrestaShop\PrestaShop\Adapter\Product\Combination\Repository\CombinationRepository:
    autowire: true
    public: false
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationStockUpdater:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Stock\Repository\StockAvailableRepository'
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Repository\CombinationRepository'
      - '@PrestaShop\PrestaShop\Adapter\Product\Stock\Repository\MovementReasonRepository'
      - '@PrestaShop\PrestaShop\Core\Stock\StockManager'
      - '@PrestaShop\PrestaShop\Core\Domain\Configuration\ShopConfigurationInterface'
      - '@prestashop.core.hook.dispatcher'

  PrestaShop\PrestaShop\Adapter\Product\Combination\Create\CombinationCreator:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\DefaultCombinationUpdater:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationDeleter:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationImagesUpdater:
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\UpdateCombinationSuppliersHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Repository\CombinationRepository'
      - '@PrestaShop\PrestaShop\Adapter\Product\Repository\ProductSupplierRepository'
      - '@PrestaShop\PrestaShop\Adapter\Product\Update\ProductSupplierUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\UpdateCombinationSuppliersCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\QueryHandler\GetCombinationSuppliersHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Repository\ProductSupplierRepository'
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Repository\CombinationRepository'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetCombinationSuppliers

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\SetCombinationImagesHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationImagesUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\SetCombinationImagesCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\RemoveAllCombinationImagesHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationImagesUpdater'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\RemoveAllCombinationImagesCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\DeleteCombinationHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationDeleter'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\DeleteCombinationCommand

  PrestaShop\PrestaShop\Adapter\Product\Combination\CommandHandler\BulkDeleteCombinationHandler:
    arguments:
      - '@PrestaShop\PrestaShop\Adapter\Product\Combination\Update\CombinationDeleter'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Command\BulkDeleteCombinationCommand

  PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\SearchProductCombinationsHandler:
    autowire: true
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\SearchProductCombinations

  PrestaShop\PrestaShop\Core\Domain\Product\Combination\QueryHandler\GetCombinationIdsHandler:
    autowire: true
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\Product\Combination\Query\GetCombinationIds

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\CombinationFiller:
    arguments:
      - !tagged core.combination_filler

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\CombinationFillerInterface: '@PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\CombinationFiller'

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\DetailsFiller:
    tags: [ 'core.combination_filler' ]

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\PricesFiller:
    tags: [ 'core.combination_filler' ]

  PrestaShop\PrestaShop\Adapter\Product\Combination\Update\Filler\StockInformationFiller:
    tags: [ 'core.combination_filler' ]
