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.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 }
