import { CreateDealerUseCase } from "@/contexts/sales/application";
import { registerDealerRepository } from "../../../../Dealer.repository";
import { ISalesContext } from "../../../../Sales.context";
import { CreateDealerController } from "./CreateDealer.controller";
import { CreateDealerPresenter } from "./presenter";

export const createDealerController = (context: ISalesContext) => {
  registerDealerRepository(context);
  return new CreateDealerController(
    {
      useCase: new CreateDealerUseCase(context),
      presenter: CreateDealerPresenter,
    },
    context
  );
};
