<?php

declare(strict_types=1);

use apexl\Io\modules\user\Factories\JwtFromRequestServiceFactory;
use apexl\Io\modules\user\interfaces\JwtFromRequestServiceFactoryInterface;
use apexl\Io\modules\user\interfaces\JwtKeyProviderInterface;
use apexl\Io\modules\user\interfaces\MasqueradeServiceInterface;
use apexl\Io\modules\user\interfaces\NewUserNotifierInterface;
use apexl\Io\modules\user\interfaces\SessionManagerInterface;
use apexl\Io\modules\user\interfaces\TokenHasherInterface;
use apexl\Io\modules\user\interfaces\UserPasswordHasherInterface;
use apexl\Io\modules\user\interfaces\UserPasswordVerifierInterface;
use apexl\Io\modules\user\notifiers\NewUserEmailNotifier;
use apexl\Io\modules\user\services\DatabaseSessionManager;
use apexl\Io\modules\user\services\JwtKeyFromConfigService;
use apexl\Io\modules\user\services\NativeTokenHasher;
use apexl\Io\modules\user\services\PasswordHashUserPasswordHasher;
use apexl\Io\modules\user\services\PasswordVerifyUserPasswordVerifier;
use apexl\Io\modules\user\services\SessionMasqueradeService;
use function DI\autowire;

return [
    NewUserNotifierInterface::class => autowire(NewUserEmailNotifier::class),
    JwtKeyProviderInterface::class => autowire(JwtKeyFromConfigService::class),
    TokenHasherInterface::class => autowire(NativeTokenHasher::class),
    UserPasswordHasherInterface::class => autowire(PasswordHashUserPasswordHasher::class),
    UserPasswordVerifierInterface::class => autowire(PasswordVerifyUserPasswordVerifier::class),
    JwtFromRequestServiceFactoryInterface::class => autowire(JwtFromRequestServiceFactory::class),
    SessionManagerInterface::class => autowire(DatabaseSessionManager::class),
    MasqueradeServiceInterface::class => autowire(SessionMasqueradeService::class),
];
