import { ListQuotesUseCase } from "@/contexts/sales/application";
import { registerQuoteRepository } from "@/contexts/sales/infrastructure/Quote.repository";
import { ISalesContext } from "@/contexts/sales/infrastructure/Sales.context";
import { ListQuotesController } from "./ListQuotes.controller";
import { ListQuotesPresenter } from "./presenter";

export const listQuotesController = (context: ISalesContext) => {
  registerQuoteRepository(context);

  return new ListQuotesController(
    {
      useCase: new ListQuotesUseCase(context),
      presenter: ListQuotesPresenter,
    },
    context
  );
};
