import { UpdateUserUseCase } from "@/contexts/users/application";
import { IUserContext } from "../../../User.context";
import { registerUserRepository } from "../../../User.repository";
import { UpdateUserController } from "./UpdateUser.controller";
import { UpdateUserPresenter } from "./presenter/UpdateUser.presenter";

export const createUpdateUserController = (context: IUserContext) => {
  registerUserRepository(context);
  return new UpdateUserController(
    {
      useCase: new UpdateUserUseCase(context),
      presenter: UpdateUserPresenter,
    },
    context,
  );
};
