# Configuration des services SSA refactorisés
services:
    # Service de calcul SSA
    App\Service\Ssa\SsaCalculationService:
        arguments:
            $em: '@App\Utils\CustomEntityManager'

    # Service de gestion des dates SSA
    App\Service\Ssa\SsaDateService: ~

    # Service de rappels SSA
    App\Service\Ssa\SsaReminderService:
        arguments:
            $em: '@App\Utils\CustomEntityManager'
            $mailer: '@swiftmailer.mailer.default'
            $templating: '@twig'
            $logger: '@monolog.logger.cron'

    # Service de prélèvements SSA
    App\Service\Ssa\SsaTakingService:
        arguments:
            $em: '@App\Utils\CustomEntityManager'
            $operationUtils: '@App\Utils\OperationUtils'
            $mailer: '@swiftmailer.mailer.default'
            $templating: '@twig'
            $logger: '@monolog.logger.cron'

    # Service de redistribution SSA
    App\Service\Ssa\SsaRedistributionService:
        arguments:
            $em: '@App\Utils\CustomEntityManager'
            $operationUtils: '@App\Utils\OperationUtils'
            $mailer: '@swiftmailer.mailer.default'
            $templating: '@twig'
            $logger: '@monolog.logger.cron'

    # Service de rapport SSA
    App\Service\Ssa\SsaReportService:
        arguments:
            $em: '@App\Utils\CustomEntityManager'
            $logger: '@monolog.logger.cron'

    # Commande SSA refactorisée
    App\Command\SSACommandRefactored:
        arguments:
            $em: '@App\Utils\CustomEntityManager'
            $cronLogger: '@monolog.logger.cron'
            $reminderService: '@App\Service\Ssa\SsaReminderService'
            $takingService: '@App\Service\Ssa\SsaTakingService'
            $redistributionService: '@App\Service\Ssa\SsaRedistributionService'
            $calculationService: '@App\Service\Ssa\SsaCalculationService'
            $dateService: '@App\Service\Ssa\SsaDateService'
            $reportService: '@App\Service\Ssa\SsaReportService'
        tags:
            - { name: 'console.command' }

    App\Command\SepaProcessingCommand:
        arguments:
           $em: '@App\Utils\CustomEntityManager'
           $subscriptionService: '@App\Service\Subscription\RecurringSubscriptionService'
           $operationUtils: '@App\Utils\OperationUtils'
           $cronLogger: '@monolog.logger.cron'
           $globalParameterRepository: '@App\Repository\GlobalParameterRepository'
           $civilYearService: '@App\Service\CivilYearService'
        tags:
            - { name: 'console.command' }