import { UpdateProfileUseCase } from "@/contexts/profile/application";
import { IProfileContext } from "../../../Profile.context";
import { registerProfileRepository } from "../../../Profile.repository";
import { UpdateProfileController } from "./UpdateProfile.controller";
import { UpdateProfilePresenter } from "./presenter";

export const createUpdateProfileController = (context: IProfileContext) => {
  registerProfileRepository(context);

  return new UpdateProfileController(
    {
      useCase: new UpdateProfileUseCase(context),
      presenter: UpdateProfilePresenter,
    },
    context
  );
};
