import type { Request, Response } from "express";
import { Router } from "express";
import z from "zod";
import { forecastEdiData } from "../../controller/demandManagement/forecastEDIData.js";

export const Preprint = z.object({
	scannerId: z.number(),
	lotNr: z.number(),
	machineId: z.number(), // 457=22, 458=23
	printerId: z.number(), // 457=22, 458=23
	layoutId: z.number(),
	numberOfCopies: z.number(),
	qtyToPrint: z.number().default(1),
});

const router = Router();

router.post("/forecastData", async (req: Request, res: Response) => {
	await forecastEdiData(req.body);

	res.status(200).json({ success: true, message: "Forecast Data", data: [] });
});

export default router;
