import { GetDealerUseCase } from "@/contexts/sales/application";
import { registerDealerRepository } from "../../../../Dealer.repository";
import { ISalesContext } from "../../../../Sales.context";
import { GetDealerController } from "./GetDealer.controller";
import { GetDealerPresenter } from "./presenter";

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

  return new GetDealerController(
    {
      useCase: new GetDealerUseCase(context),
      presenter: GetDealerPresenter,
    },
    context
  );
};
