services:
  _defaults:
    public: true

  prestashop.adapter.catalog_price_rule.command_handler.delete_catalog_price_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\DeleteCatalogPriceRuleHandler'
    autoconfigure: true

  prestashop.adapter.catalog_price_rule.command_handler.bulk_delete_catalog_price_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\BulkDeleteCatalogPriceRuleHandler'
    autoconfigure: true

  prestashop.adapter.catalog_price_rule.command_handler.add_catalog_price_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\AddCatalogPriceRuleHandler'
    autoconfigure: true

  prestashop.adapter.catalog_price_rule.command_handler.edit_catalog_price_rule_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\CommandHandler\EditCatalogPriceRuleHandler'
    autoconfigure: true

  prestashop.adapter.catalog_price_rule.command_handler.get_catalog_price_rule_for_editing_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleForEditingHandler'
    autoconfigure: true

  prestashop.adapter.catalog_price_rule.query_handler.get_catalog_price_rule_list_for_product_handler:
    class: 'PrestaShop\PrestaShop\Adapter\CatalogPriceRule\QueryHandler\GetCatalogPriceRuleListForProductHandler'
    autoconfigure: true
    arguments:
      - '@prestashop.adapter.catalog_price_rule.repository.catalog_price_rule_repository'

  prestashop.adapter.catalog_price_rule.repository.catalog_price_rule_repository:
    class: PrestaShop\PrestaShop\Adapter\CatalogPriceRule\Repository\CatalogPriceRuleRepository
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'
