# config/services.yaml
parameters:
    app.base_url: '%env(APP_URL)%'
    geoip_database_path: '%kernel.project_dir%/geoip/GeoLite2-City.mmdb'

services:
    # default configuration for services in this file
    _defaults:
        autowire: true
        autoconfigure: true

    # makes classes in src/ available to be used as services
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Kernel.php'

    # Configuration du service d'envoi d'emails de commande
    App\Service\OrderMailerService:
        arguments:
            $adminEmail: 'contact@num-ecard.com'
            $fromEmail: 'noreply@num-ecard.com'
            $fromName: 'NUM-ECARD'

    # Configuration du WebhookController Stripe
    App\Controller\WebhookController:
        arguments:
            $stripeSecretKey: '%env(STRIPE_SECRET_KEY)%'
            $webhookSecret: '%env(STRIPE_WEBHOOK_SECRET)%'

    # Configuration du StripeService
    App\Service\StripeService:
        arguments:
            $stripeSecretKey: '%env(STRIPE_SECRET_KEY)%'

    App\Service\WebPushService:
        arguments:
            $vapidPublicKey: '%env(VAPID_PUBLIC_KEY)%'
            $vapidPrivateKey: '%env(VAPID_PRIVATE_KEY)%'
            $vapidSubject: '%env(VAPID_SUBJECT)%'