import { Router } from "express";
import { adminAuthRouter } from "./admin-auth.routes.js";
import { adminCatalogRouter } from "./admin-catalog.routes.js";
import { adminMetricsRouter } from "./admin-metrics.routes.js";
import { adminMonitoringRouter } from "./admin-monitoring.routes.js";
import { adminTechStepsRouter } from "./admin-tech-steps.routes.js";

/**
 * Aggregator for the admin application's API surface, mounted at `/admin`
 * in `app.ts`. Every sub-router here backs `apps/web`'s `/admin/*` routes
 * only — `/admin/auth` is public (login), everything added later
 * (`/admin/metrics`, `/admin/monitoring`, `/admin/tech-steps/*`,
 * `/admin/catalog/*`) sits behind `requireAdmin`
 * (`middlewares/require-admin.ts`).
 */
export const adminRouter = Router();

adminRouter.use("/auth", adminAuthRouter);
adminRouter.use("/metrics", adminMetricsRouter);
adminRouter.use("/monitoring", adminMonitoringRouter);
adminRouter.use("/tech-steps", adminTechStepsRouter);
adminRouter.use("/catalog", adminCatalogRouter);
