<?php

namespace common\logic\User\User\Module;

use common\logic\AbstractModule;
use common\logic\User\User\Repository\UserRepository;
use common\logic\User\User\Repository\UserRepositoryQuery;
use common\logic\User\User\Service\AuthorizationChecker;
use common\logic\User\User\Service\NewsletterManager;
use common\logic\User\User\Service\UserBuilder;
use common\logic\User\User\Service\UserBulkImporter;
use common\logic\User\User\Service\UserDefinition;
use common\logic\User\User\Service\UserManager;
use common\logic\User\User\Service\UserNotifier;
use common\logic\User\User\Service\UsersCreditCsvGenerator;
use common\logic\User\User\Service\UserSolver;

/**
 * @mixin UserDefinition
 * @mixin UserSolver
 * @mixin UserRepository
 * @mixin UserBuilder
 * @mixin UserNotifier
 * @mixin UsersCreditCsvGenerator
 * @mixin NewsletterManager
 * @mixin AuthorizationChecker
 * @mixin UserBulkImporter
 * @mixin UserManager
 */
class UserModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            UserDefinition::class,
            UserSolver::class,
            UserRepositoryQuery::class,
            UserRepository::class,
            UserBuilder::class,
            UserNotifier::class,
            UsersCreditCsvGenerator::class,
            NewsletterManager::class,
            AuthorizationChecker::class,
            UserBulkImporter::class,
            UserManager::class,
        ];
    }

    public function getDefinition(): UserDefinition
    {
        return UserDefinition::getInstance();
    }

    public function getSolver(): UserSolver
    {
        return UserSolver::getInstance();
    }

    public function getRepository(): UserRepository
    {
        return UserRepository::getInstance();
    }

    public function getBuilder(): UserBuilder
    {
        return UserBuilder::getInstance();
    }

    public function getNotifier(): UserNotifier
    {
        return UserNotifier::getInstance();
    }

    public function getUsersCreditCsvGenerator(): UsersCreditCsvGenerator
    {
        return UsersCreditCsvGenerator::getInstance();
    }

    public function getNewsletterManager(): NewsletterManager
    {
        return NewsletterManager::getInstance();
    }

    public function getAuthorizationChecker(): AuthorizationChecker
    {
        return AuthorizationChecker::getInstance();
    }

    public function getBulkImporter(): UserBulkImporter
    {
        return UserBulkImporter::getInstance();
    }

    public function getManager(): UserManager
    {
        return UserManager::getInstance();
    }
}