services:
  _defaults:
    public: true

  prestashop.core.domain.customer_service.command_handler.delete_customer_thread_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\DeleteCustomerThreadHandler'
    arguments:
      - '@prestashop.core.domain.customer_service.repository.customer_thread_repository'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\DeleteCustomerThreadCommand

  prestashop.core.domain.customer_service.command_handler.bulk_delete_customer_thread_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\BulkDeleteCustomerThreadHandler'
    arguments:
      - '@prestashop.core.domain.customer_service.repository.customer_thread_repository'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\BulkDeleteCustomerThreadCommand

  prestashop.core.domain.customer_service.command_handler.add_order_customer_message:
    class: PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\AddOrderCustomerMessageHandler
    arguments:
      - '@translator'
      - '@validator'
      - '@=service("prestashop.adapter.legacy.context").getContext().shop.id'
      - '@=service("prestashop.adapter.legacy.context").getContext().language.id'
      - '@=service("prestashop.adapter.legacy.context").getContext().employee.id'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\CustomerMessage\Command\AddOrderCustomerMessageCommand

  prestashop.core.domain.customer_service.query_handler.get_customer_thread_for_viewing_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\QueryHandler\GetCustomerThreadForViewingHandler'
    arguments:
      - '@=service("prestashop.adapter.legacy.context").getContext()'
    tags:
      - name: tactician.handler
        command: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\Query\GetCustomerThreadForViewing'

  prestashop.core.domain.customer_service.query_handler.get_customer_service_signature_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\QueryHandler\GetCustomerServiceSignatureHandler'
    arguments:
      - '@prestashop.adapter.legacy.configuration'
    tags:
      - name: tactician.handler
        command: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\Query\GetCustomerServiceSignature'

  prestashop.core.domain.customer_service.command_handler.forward_customer_thread_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\ForwardCustomerThreadHandler'
    arguments:
      - '@=service("prestashop.adapter.legacy.context").getContext()'
      - '@prestashop.adapter.legacy.configuration'
    tags:
      - name: tactician.handler
        command: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\ForwardCustomerThreadCommand'

  prestashop.core.domain.customer_service.command_handler.reply_to_customer_thread_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\ReplyToCustomerThreadHandler'
    arguments:
      - '@=service("prestashop.adapter.legacy.context").getContext()'
    tags:
      - name: tactician.handler
        command: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\ReplyToCustomerThreadCommand'

  prestashop.core.domain.customer_service.command_handler.update_customer_thread_status_handler:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\CommandHandler\UpdateCustomerThreadStatusHandler'
    arguments:
      $connection: '@doctrine.dbal.default_connection'
      $dbPrefix: '%database_prefix%'
    tags:
      - name: tactician.handler
        command: PrestaShop\PrestaShop\Core\Domain\CustomerService\Command\UpdateCustomerThreadStatusCommand

  prestashop.core.domain.customer_service.repository.customer_thread_repository:
    class: 'PrestaShop\PrestaShop\Core\Domain\CustomerService\Repository\CustomerThreadRepository'
