import { CreateUserUseCase } from "@/contexts/users/application";
import { IUserContext } from "../../../User.context";
import { registerUserRepository } from "../../../User.repository";
import { CreateUserController } from "./CreateUser.controller";
import { CreateUserPresenter } from "./presenter/CreateUser.presenter";

export const createCreateUserController = (context: IUserContext) => {
  registerUserRepository(context);

  return new CreateUserController(
    {
      useCase: new CreateUserUseCase(context),
      presenter: CreateUserPresenter,
    },
    context,
  );
};
