# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
    MEDIA_URL: "%env(MEDIA_URL)%"
    RESET_PASSWORD_URL: "%env(RESET_PASSWORD_URL)%"
    CREATE_PASSWORD_URL: "%env(CREATE_PASSWORD_URL)%"
    HIT_PAY_API_KEY: "%env(HIT_PAY_API_KEY)%"
    HIT_PAY_URL: "%env(HIT_PAY_URL)%"
    HIT_PAY_REDIRECT_URL: "%env(HIT_PAY_REDIRECT_URL)%"
    HIT_PAY_WEBHOOK_URL: "%env(HIT_PAY_WEBHOOK_URL)%"
    FIREBASE_REAL_TIME_DATABASE_URL: "%env(FIREBASE_REAL_TIME_DATABASE_URL)%"
    FIREBASE_CONFIG_FILE: "%env(FIREBASE_CONFIG_FILE)%"
    FIREBASE_URL: "%env(FIREBASE_URL)%"
services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/User/'
            - '../src/Kernel.php'
            - '../src/Eimaths/Services/Fonts'

    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones

    App\Eimaths\Payment\Services\PaymentScalarReturnTypeService:
        lazy: true
    App\Eimaths\Payment\Model\Invoice:
        lazy: true
    App\Eimaths\Franchisee\Services\FranchiseeScalarReturnTypeService:
        lazy: true
    App\Eimaths\Order\Model\SalesOrderGeneration:
        lazy: true
        tags:
            - { name: 'kernel.event_listener', event: kernel.terminate, method: onKernelTerminate }
    App\Eimaths\Order\Model\DeliveryOrderGeneration:
        lazy: true
        tags:
            - { name: 'kernel.event_listener', event: kernel.terminate, method: onKernelTerminate }
    App\Eimaths\Order\Model\OrderPackingListGeneration:
        lazy: true
        tags:
            - { name: 'kernel.event_listener', event: kernel.terminate, method: onKernelTerminate }
    App\Eimaths\Student\Services\StudentScalarReturnTypeService:
        lazy: true
    App\Eimaths\Payment\Model\InvoiceGeneration:
        tags:
            - { name: 'kernel.event_listener', event: kernel.terminate, method: onKernelTerminate }
    App\Eimaths\Services\Mailer:
        tags:
            - { name: 'kernel.event_listener', event: kernel.terminate, method: onKernelTerminate }
