<?php

declare(strict_types=1);

use apexl\Io\modules\user\entities\userEntity;
use apexl\Io\modules\user\interfaces\JwtKeyProviderInterface;
use apexl\Io\modules\user\interfaces\newUserNotifier;
use apexl\Io\modules\user\notifiers\newUserEmailNotifier;
use apexl\Io\modules\user\services\JwtKeyFromConfigService;
use function apexl\Io\container;
use function DI\autowire;

return [
    newUserNotifier::class =>
        fn(userEntity $user): newUserNotifier => container()->make(
            newUserEmailNotifier::class,
            ['user' => $user]
        ),
    JwtKeyProviderInterface::class => autowire(JwtKeyFromConfigService::class),
];
