import { ListUsersUseCase } from "@/contexts/users/application";
import { IUserContext } from "../../../User.context";
import { registerUserRepository } from "../../../User.repository";
import { ListUsersController } from "./ListUsers.controller";
import { listUsersPresenter } from "./presenter";

export const createListUsersController = (context: IUserContext) => {
  registerUserRepository(context);
  return new ListUsersController(
    {
      useCase: new ListUsersUseCase(context),
      presenter: listUsersPresenter,
    },
    context,
  );
};
