# 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:
    mailer_from: '%env(MAILER_FROM)%'
    mailer_from_name: '%env(MAILER_FROM_NAME)%'
    upload_image_folder: '%env(UPLOAD_IMAGE_FOLDER)%'
    sherlook_app_url: '%env(SHERLOOK_APP_URL)%'
    stripe_public_key: '%env(STRIPE_PUBLIC_KEY)%'
    stripe_secret_key: '%env(STRIPE_SECRET_KEY)%'
    stripe_price_id: '%env(PRICE_ID)%'
    colissimo_id: '%env(COLISSIMO_ID)%'
    colissimo_password: '%env(COLISSIMO_PASSWORD)%'
    colissimo_company: '%env(COLISSIMO_COMPANY)%'
    colissimo_address: '%env(COLISSIMO_ADDRESS)%'
    colissimo_zipcode: '%env(COLISSIMO_ZIPCODE)%'
    colissimo_city: '%env(COLISSIMO_CITY)%'
    colissimo_countrycode: '%env(COLISSIMO_COUNTRYCODE)%'
    colissimo_phone: '%env(COLISSIMO_PHONE)%'
    colissimo_email: '%env(COLISSIMO_EMAIL)%'
    app.default_customer_email: 'test@sherlook.fr'


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/Entity/'
            - '../src/Kernel.php'
            - '../src/Tests/'

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

    App\Service\MessageService:
        arguments:
            $entityManager: '@doctrine.orm.entity_manager'

    App\Service\MessageValidator:
        arguments:
            $maxFileSize: '%env(int:MAX_FILE_SIZE)%'
            $allowedExtensions: ['jpg', 'jpeg', 'png']
            $allowedMimeTypes: ['image/jpeg', 'image/png']

    App\Service\EmailConfig:
        arguments:
            $defaultCustomerEmail: '%app.default_customer_email%'

    App\Service\NotificationBuilder:
        arguments:
            $entityManager: '@doctrine.orm.entity_manager'

    App\DataPersister\MatchingDataPersister:
        tags: ['api_platform.state_processor']
