services:
  _defaults:
    public: true

  ##############
  # Your Module

  chatyprestashop.module:
    class: Chatyprestashop
    factory: ['Module', 'getInstanceByName']
    arguments:
      - 'chatyprestashop'

  chatyprestashop.context:
    class: Context
    factory: ['Context', 'getContext']

  #####################
  # PrestaShop Account

  chatyprestashop.ps_accounts_installer:
    class: 'PrestaShop\PsAccountsInstaller\Installer\Installer'
    arguments:
      - '5.0'

  chatyprestashop.ps_accounts_facade:
    class: 'PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts'
    arguments:
      - '@chatyprestashop.ps_accounts_installer'

  #####################
  # PrestaShop Billing

  chatyprestashop.ps_billings_context_wrapper:
    class: 'PrestaShopCorp\Billing\Wrappers\BillingContextWrapper'
    arguments:
    - '@chatyprestashop.ps_accounts_facade'
    - '@chatyprestashop.context'
    - false # if true, enables the sandbox mode, if false or empty, disables it

  chatyprestashop.ps_billings_facade:
    class: 'PrestaShopCorp\Billing\Presenter\BillingPresenter'
    public: true
    arguments:
    - '@chatyprestashop.ps_billings_context_wrapper'
    - '@chatyprestashop.module'

  # Remove this if you do not need BillingService
  chatyprestashop.ps_billings_service:
    class: 'PrestaShopCorp\Billing\Services\BillingService'
    public: true
    arguments:
    - '@chatyprestashop.ps_billings_context_wrapper'
    - '@chatyprestashop.module'