services:
    _defaults:
        public: true

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

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

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

    #####################
    # PrestaShop Account
    smartargetwhatsapp.ps_accounts_installer:
        class: 'PrestaShop\PsAccountsInstaller\Installer\Installer'
        arguments:
            - '5.0'

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

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

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

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

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