# 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:
    stripe_public: '%env(STRIPE_PUBLIC)%'
    stripe_private: '%env(STRIPE_PRIVATE)%'
    server_url: '%env(SERVER_URL)%'
    stripe.free.product: '%env(STRIPE_FREE_PRODUCT)%'
    stripe.invoice.prefix: '%env(SCHOOL)%' 

    contact_email: '%env(CONTACT_EMAIL)%'
    app.mailer: '%env(MAILER_DSN)%'
    app.mailer.key: '%env(MAILER_API_KEY)%'
    google_client_id: '%env(GOOGLE_CLIENT_ID)%'
    google_client_secret: '%env(GOOGLE_CLIENT_SECRET)%'
    recaptcha_public: '%env(RECAPTCHA_PUBLIC)%'
    recaptcha_private: '%env(RECAPTCHA_PRIVATE)%'
services:
    App\Security\LoginHandler:
        arguments:
            $router: '@router'
    App\EventSubscriber\LocaleSubscriber:
        tags: 
            - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest}
    # 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/Entity/'
            - '../src/Kernel.php'

    App\Service\FileUploaderService:
        arguments:
            $targetDirectory: '../public/files/'
    
    App\Service\StripeService:
        arguments:
            $freeProduct: '%stripe.free.product%'
            $prefix: '%stripe.invoice.prefix%'
