# 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/configuration.html#application-related-configuration
parameters:
    locale: 'fr'
    maintenance:
        statut: false
        ipAuthorized: []

    google_api_base_uri: https://maps.googleapis.com
    google_api_key: '%env(GOOGLE_API_KEY)%'

    app.path.product_images: /uploads/images/products
    app.product.on.site: ['sur site']
    app.product.available: ['disponible']
    app.product.lost: 'perdu'
    app.product.broken: 'casse'
    app.product.defective: 'defectueux'

    app.maintenance.detail.type.add: ['ajout']
    app.maintenance.detail.type.del: ['suppression']
    app.maintenance.detail.type.replace: ['remplacement']

    app.maintenance.type.pose: ['pose']
    app.maintenance.type.maintenance: ['maintenance']
    app.maintenance.type.depose: ['dépose']
    app.maintenance.type.remplacement: ['inactif']
    app.maintenance.type.remplacant: ['disponible']

    app.customer.create.state.actif: ['actif']

    app.contact.create.state.actif: ['actif']

    #Maintenance cyclique par defaut (mois)
    #Ne pas oublier de changer egalement dans config/packages/twig.yaml
    app.cyclical.maintenance.default: 12

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.
        bind:
            $ProtectContactMailer: '@swiftmailer.mailer.protect_contact'
            $EleonisHotlineMailer: '@swiftmailer.mailer.eleonis_hotline'

    # 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,Entity,Migrations,Tests,Kernel.php}'

    # controllers are imported separately to make sure services can be injected
    # as action arguments even if you don't extend any base controller class
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']

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

    App\Listener\ImageCacheSubscriber:
        tags:
        - { name: kernel.event_listener, event: vich_uploader.pre_remove }

    App\Listener\MaintenanceListener:
        tags:
            - { name: kernel.event_listener, event: kernel.request }
        arguments: ['%maintenance%']

    twig.mobile_detect_extension:
        class: Bes\Twig\Extension\MobileDetectExtension
        tags:
            - { name: twig.extension }


    #App\Services\GoogleApis:
        #arguments:
           # - '@eight_points_guzzle.client.google'




framework:
    translator: { fallbacks: ['%locale%'] }