# 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
imports:
    - { resource: services/ }

parameters:
    locale: hu
    default_locale: hu
    enabled_locales: [hu]

    mailer_sender_address: '%env(MAILER_SENDER_ADDRESS)%'
    mailer_sender_name: '%env(MAILER_SENDER_NAME)%'

    admin_activity_time: '%env(ADMIN_ACTIVITY_TIME)%'
    admin_verify_backup: '%env(ADMIN_VERIFY_BACKUP)%'

    app.user_reset_request_lifetime: '%env(APP_USER_RESET_REQUEST_LIFETIME)%'
    app.user_reset_request_throttle: '%env(APP_USER_RESET_REQUEST_THROTTLE)%'

    app.authentication.portal.ttl: '%env(APP_AUTHENTICATION_PORTAL_TTL)%'
    app.authentication.portal.verification.token_length: '%env(APP_AUTHENTICATION_PORTAL_VERIFICATION_TOKEN_LENGTH)%'

    app.recaptcha.private_key: '%env(resolve:GOOGLE_RECAPTCHA_SECRET_KEY)%'
    app.recaptcha.enabled: '%env(bool:resolve:GOOGLE_RECAPTCHA_ENABLED)%'
    app.api_url: '%env(API_URL)%'

    app:
        supported_locales: '%enabled_locales%'

    portal_url: '%env(resolve:PORTAL_URL)%'

    doctrine_translatable_fetch_mode: 'LAZY'
    doctrine_translation_fetch_mode: 'LAZY'

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:
            $translatableFetchMode: '%doctrine_translatable_fetch_mode%'
            $translationFetchMode: '%doctrine_translation_fetch_mode%'
    # 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/Attribute/'
            - '../src/Command/'
            - '../src/DependencyInjection/'
            - '../src/DTO/'
            - '../src/Entity/'
            - '../src/Enum/'
            - '../src/Event/'
            - '../src/Exception/'
            - '../src/Helper/'
            - '../src/Security/'
            - '../src/Service/'
            - '../src/Traits/'
            - '../src/Kernel.php'

    Twig\Extension\StringLoaderExtension:
        tags: [ twig.extension ]
    # add more service definitions when explicit configuration is needed
    # please note that last definitions always *replace* previous ones

    App\Form\Type\BaseTranslationsType:
        arguments:
            - '@a2lix_translation_form.form.event_listener.translations_listener'
            - '@a2lix_translation_form.locale.simple_provider'

    App\Form\Extension\DateTimeExtension:
        tags:
            - { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\DateTimeType }

    App\Service\Block\BlockProcessor:
        arguments:
            - '@twig'

    App\Service\System\OwnerProvider:


