import type { Express } from "express";
import { requireAuth } from "../middleware/auth.middleware.js";
import { featureCheck } from "../middleware/featureActive.middleware.js";

import listener from "./ocp.printer.listener.js";
import update from "./ocp.printer.update.js";

export const setupOCPRoutes = (baseUrl: string, app: Express) => {
	app.use(`${baseUrl}/api/ocp/printer/listener`, featureCheck("ocp"), listener);
	app.use(
		`${baseUrl}/api/ocp/printer`,
		featureCheck("ocp"),
		requireAuth,
		update,
	);
};
