import { Module } from "@nestjs/common";
import { OCR_PROVIDER } from "../statements/ocr/ocr.provider";
import { TesseractOcrProvider } from "../statements/ocr/tesseract.provider";

/**
 * Lifts the OCR seam out of StatementsModule so other modules (today:
 * PolicyOcrModule) can inject OCR_PROVIDER without taking on the rest of
 * the statement intake. StatementsModule itself imports this and gets the
 * provider the same way.
 *
 * The concrete engine is still bound here — Tesseract today, a managed
 * extraction API later is a one-line change in this file.
 */
@Module({
  providers: [{ provide: OCR_PROVIDER, useClass: TesseractOcrProvider }],
  exports: [OCR_PROVIDER],
})
export class OcrModule {}