services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false
        bind:
            string $maxSize: '%APP_MAX_UPLOAD_SIZE%'
            bool $activeNotifications: '%APP_ACTIVATE_NOTIFICATIONS%'


    App\Application\:
        resource: '../src/Application/*'
        exclude: '../src/Application/{Controller,Dictionary,Entity,Migrations,Symfony/EventSubscriber,Symfony/Form,Tests,Kernel.php}'

    App\Domain\:
        resource: '../src/Domain/*'
        exclude: '../src/Domain/*/{Cloner,Component/Mailer.php,Controller,Dictionary,Generator,Handler,Model,Symfony/EventSubscriber,Symfony/Form,Tests}'

    PhpOffice\PhpWord\PhpWord: ~
    RandomLib\Factory: ~

    Knp\DictionaryBundle\Faker\Provider\Dictionary:
        tags: [ { name: hautelook_alice.faker.provider } ]

    App\Domain\Reporting\Metrics\UserMetric:
        arguments:
            $userLogJounalViewLimit: '%env(APP_USER_DASHBOARD_JOURNALISATION_LIMIT)%'

    Rollerworks\Component\PasswordStrength\Validator\Constraints\PasswordRequirementsValidator: ~

    App\Domain\User\Validator\Constraints\CustomPasswordValidator:
        arguments:
            $minLength: '%env(APP_PASSWORD_REQUIRE_MIN_LENGTH)%'
            $requireCaseDiff: '%env(APP_PASSWORD_REQUIRE_CASE_DIFF)%'
            $requireLetters: '%env(APP_PASSWORD_REQUIRE_LETTERS)%'
            $requireNumbers: '%env(APP_PASSWORD_REQUIRE_NUMBERS)%'
            $requireSpecialCharacter: '%env(APP_PASSWORD_REQUIRE_SPECIAL_CHARACTERS)%'


#    App\EventSubscriber\LogoutSubscriber:

    App\Application\Symfony\OpenApi\JwtDecorator:
        decorates: 'api_platform.openapi.factory'
        autoconfigure: false

    aipd.form.flow.modele_analyse:
        class: App\Domain\AIPD\Form\Flow\ModeleAIPDFlow

    aipd.form.flow.analyse_impact:
        class: App\Domain\AIPD\Form\Flow\AnalyseImpactFlow

    maturity.form.flow.survey:
      class: App\Domain\Maturity\Form\Flow\SurveyFlow

    aipd.model.analyse_impact:
        class: App\Domain\AIPD\Model\AnalyseImpact

    App\Domain\Notification\Symfony\EventSubscriber\Doctrine\NotificationEventSubscriber:
        arguments:
            $notificationRepository: '@App\Infrastructure\ORM\Notification\Repository\Notification'
            $normalizer: '@App\Domain\Notification\Serializer\NotificationNormalizer'
            $userRepository: '@App\Domain\User\Repository\User'
            $security: '@Symfony\Component\Security\Core\Security'
            $translator: '@Symfony\Contracts\Translation\TranslatorInterface'
            $requestDays: '%env(APP_REQUEST_NOTIFICATION_DELAY_DAYS)%'
            $surveyDays: '%env(APP_SURVEY_NOTIFICATION_DELAY_DAYS)%'
        tags: [ { name: doctrine.event_subscriber } ]

    App\Domain\Notification\Subscriber\NotificationEventSubscriber:
        arguments:
            $notificationRepository: '@App\Infrastructure\ORM\Notification\Repository\Notification'
            $notificationUserRepository: '@App\Infrastructure\ORM\Notification\Repository\NotificationUser'
            $normalizer: '@App\Domain\Notification\Serializer\NotificationNormalizer'
            $userRepository: '@App\Domain\User\Repository\User'
            $translator: '@Symfony\Contracts\Translation\TranslatorInterface'
            $requestDays: '%env(APP_REQUEST_NOTIFICATION_DELAY_DAYS)%'
            $surveyDays: '%env(APP_SURVEY_NOTIFICATION_DELAY_DAYS)%'
        tags: [ { name: event_subscriber } ]

    App\Domain\Notification\Twig\Extension\NotificationExtension:
        arguments:
            $translator: '@translator'
            $router: '@router'
            $security: '@Symfony\Component\Security\Core\Security'
            $requestDays: '%env(APP_REQUEST_NOTIFICATION_DELAY_DAYS)%'
            $surveyDays: '%env(APP_SURVEY_NOTIFICATION_DELAY_DAYS)%'

    App\Domain\AIPD\Model\AnalyseImpact: '@aipd.model.analyse_impact'
imports:
    - { resource: services/cloner.yaml }
    - { resource: services/controller.yaml }
    - { resource: services/dictionary.yaml }
    - { resource: services/event_subscriber.yaml }
    - { resource: services/generator.yaml }
    - { resource: services/mail.yaml }
    - { resource: services/forms.yaml }
