services:
  _defaults:
    public: true

  PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\AddCartRuleHandler:
    autowire: true
    public: false
    autoconfigure: true

  PrestaShop\PrestaShop\Adapter\CartRule\QueryHandler\GetCartRuleForEditingHandler:
    autowire: true
    public: false
    autoconfigure: true

  prestashop.adapter.cart_rule.query_handler.search_cart_rules_handler:
    class: PrestaShop\PrestaShop\Adapter\CartRule\QueryHandler\SearchCartRulesHandler
    autoconfigure: true
    arguments:
      - "@=service('prestashop.adapter.legacy.context').getContext().language.id"

  prestashop.adapter.cart_rule.command_handler.delete_cart_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\DeleteCartRuleHandler'
    autoconfigure: true

  prestashop.adapter.cart_rule.command_handler.bulk_delete_cart_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\BulkDeleteCartRuleHandler'
    autoconfigure: true

  prestashop.adapter.cart_rule.command_handler.toggle_cart_rule_status_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\ToggleCartRuleStatusHandler'
    autoconfigure: true

  prestashop.adapter.cart_rule.command_handler.bulk_toggle_cart_rule_status_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\BulkToggleCartRuleStatusHandler'
    autoconfigure: true

  PrestaShop\PrestaShop\Adapter\CartRule\Validate\CartRuleValidator:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\CartRule\Repository\CartRuleRepository:
    autowire: true
    public: false
    arguments:
      $connection: '@doctrine.dbal.default_connection'
      $dbPrefix: '%database_prefix%'

  PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\EditCartRuleHandler:
    autowire: true
    public: false
    autoconfigure: true

  PrestaShop\PrestaShop\Adapter\CartRule\CartRuleActionFiller:
    autowire: true
    public: false

  PrestaShop\PrestaShop\Adapter\CartRule\CommandHandler\SetCartRuleRestrictionsHandler:
    autowire: true
    public: false
    autoconfigure: true
