<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\Factories;

use apexl\Io\modules\user\entities\userEntity;
use apexl\Io\modules\user\services\UserRoleManagerService;
use DI\Container;
use DI\DependencyException;
use DI\NotFoundException;

final readonly class UserRoleManagerFactory
{
    public function __construct(private Container $container) {}

    /**
     * @throws DependencyException
     * @throws NotFoundException
     */
    public function make(userEntity $user): UserRoleManagerService
    {
        return $this->container->make(UserRoleManagerService::class, [
            'user' => $user
        ]);
    }
}