services:
  _defaults:
    public: true

  prestashop.adapter.security.command_handler.delete_customer_session_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\DeleteCustomerSessionHandler'
    arguments:
      - '@prestashop.adapter.security.repository.customer_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\DeleteCustomerSessionCommand'

  prestashop.adapter.security.command_handler.clear_customer_session_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\ClearOutdatedCustomerSessionHandler'
    arguments:
      - '@prestashop.adapter.security.repository.customer_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\ClearOutdatedCustomerSessionCommand'

  prestashop.adapter.security.command_handler.delete_employee_session_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\DeleteEmployeeSessionHandler'
    arguments:
      - '@prestashop.adapter.security.repository.employee_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\DeleteEmployeeSessionCommand'

  prestashop.adapter.security.command_handler.clear_employee_session_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\ClearOutdatedEmployeeSessionHandler'
    arguments:
      - '@prestashop.adapter.security.repository.employee_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\ClearOutdatedEmployeeSessionCommand'

  prestashop.adapter.security.command_handler.bulk_delete_employees_sessions_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\BulkDeleteEmployeeSessionsHandler'
    arguments:
      - '@prestashop.adapter.security.repository.employee_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\BulkDeleteEmployeeSessionsCommand'

  prestashop.adapter.security.command_handler.bulk_delete_customers_sessions_handler:
    class: 'PrestaShop\PrestaShop\Adapter\Security\CommandHandler\BulkDeleteCustomerSessionsHandler'
    arguments:
      - '@prestashop.adapter.security.repository.customer_session_repository'
    tags:
      - name: 'tactician.handler'
        command: 'PrestaShop\PrestaShop\Core\Domain\Security\Command\BulkDeleteCustomerSessionsCommand'

  prestashop.adapter.security.repository.customer_session_repository:
    class: 'PrestaShop\PrestaShop\Adapter\Session\Repository\CustomerSessionRepository'
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'
      - '@=service("prestashop.adapter.legacy.configuration").get("PS_COOKIE_LIFETIME_FO")'

  prestashop.adapter.security.repository.employee_session_repository:
    class: 'PrestaShop\PrestaShop\Adapter\Session\Repository\EmployeeSessionRepository'
    arguments:
      - '@doctrine.dbal.default_connection'
      - '%database_prefix%'
      - '@=service("prestashop.adapter.legacy.configuration").get("PS_COOKIE_LIFETIME_BO")'
