import type { Express } from "express";
import { featureCheck } from "../middleware/featureActive.middleware.js";
import forecast from "./logistics.dm.forecast.route.js";
import orders from "./logistics.dm.orders.route.js";
import createTemplate from "./logistics.dm.template.route.js";

export const setupLogisticsRoutes = (baseUrl: string, app: Express) => {
	//stats will be like this as we dont need to change this

	app.use(
		`${baseUrl}/api/logistics/dm/template`,
		featureCheck("demandManagement"),
		createTemplate,
	);
	app.use(
		`${baseUrl}/api/logistics/dm/forecast`,
		featureCheck("demandManagement"),
		forecast,
	);

	app.use(
		`${baseUrl}/api/logistics/dm/orders`,
		featureCheck("demandManagement"),
		orders,
	);

	// all other system should be under /api/system/*
};
