import { SendIncidenceUseCase } from "@/contexts/support/application/SendIncidence.useCase";
import { ISupportContext } from "../../../Support.context";
import { SendIncidenceController } from "./SendIncidence.controller";

export const createSendIncidenceController = (context: ISupportContext) => {
  if (!context) {
    throw new Error("Support context is required");
  }

  return new SendIncidenceController(
    {
      useCase: new SendIncidenceUseCase(context),
    },
    context
  );
};
