services:
  _defaults:
    public: true

  prestashop.adapter.cart_rule.command_handler.add_cart_rule_handler:
    class: PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\AddCartRuleHandler
    tags:
      - { name: tactician.handler, command: PrestaShop\PrestaShop\Core\Domain\CartRule\Command\AddCartRuleCommand }

  prestashop.adapter.cart_rule.query_handler.get_cart_rule_for_editing:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\QueryHandler\GetCartRuleForEditingHandler'
    arguments:
      - '@prestashop.core.image.parser.image_tag_source_parser'
    tags:
      - name: tactician.handler
        command: 'PrestaShop\PrestaShop\Core\Domain\CartRule\Query\GetCartRuleForEditing'

  prestashop.adapter.cart_rule.query_handler.search_cart_rules_handler:
    class: PrestaShop\PrestaShop\Adapter\CartRule\QueryHandler\SearchCartRulesHandler
    arguments:
      - "@=service('prestashop.adapter.legacy.context').getContext().language.id"
    tags:
      - { name: tactician.handler, command: PrestaShop\PrestaShop\Core\Domain\CartRule\Query\SearchCartRules }

  prestashop.adapter.cart_rule.command_handler.delete_cart_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\DeleteCartRuleHandler'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\CartRule\Command\DeleteCartRuleCommand'

  prestashop.adapter.cart_rule.command_handler.bulk_delete_cart_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\BulkDeleteCartRuleHandler'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\CartRule\Command\BulkDeleteCartRuleCommand'

  prestashop.adapter.cart_rule.command_handler.toggle_cart_rule_status_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\ToggleCartRuleStatusHandler'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\CartRule\Command\ToggleCartRuleStatusCommand'

  prestashop.adapter.cart_rule.command_handler.bulk_toggle_cart_rule_status_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\BulkToggleCartRuleStatusHandler'
    tags:
      - { name: 'tactician.handler', command: 'PrestaShop\PrestaShop\Core\Domain\CartRule\Command\BulkToggleCartRuleStatusCommand' }
