import { GetDealerByUserUseCase } from "@/contexts/sales/application";
import { registerDealerRepository } from "../../../../Dealer.repository";
import { ISalesContext } from "../../../../Sales.context";
import { GetDealerByUserController } from "./GetDealerByUser.controller";
import { GetDealerByUserPresenter } from "./presenter";

export const getDealerByUserController = (context: ISalesContext) => {
  registerDealerRepository(context);

  return new GetDealerByUserController(
    {
      useCase: new GetDealerByUserUseCase(context),
      presenter: GetDealerByUserPresenter,
    },
    context
  );
};
