import { Router } from 'express';
import { applicationRoutes } from './applicationRoutes.js';
import { assetRoutes } from './assetRoutes.js';
import { authRoutes } from './authRoutes.js';
import { bootstrapRoutes } from './bootstrapRoutes.js';
import { credentialRoutes } from './credentialRoutes.js';
import { folderRoutes, scriptRoutes } from './libraryRoutes.js';
import { governanceRoutes } from './governanceRoutes.js';
import { groupRoutes } from './groupRoutes.js';
import { graphRoutes } from './graphRoutes.js';
import { helpRoutes } from './helpRoutes.js';
import { hostRoutes } from './hostRoutes.js';
import { jobRoutes } from './jobRoutes.js';
import { logRoutes } from './logRoutes.js';
import { packagingRoutes } from './packagingRoutes.js';
import { psadtRoutes } from './psadtRoutes.js';
import { runPlanRoutes } from './runPlanRoutes.js';
import { settingsRoutes } from './settingsRoutes.js';
import { userRoutes } from './userRoutes.js';
import { variableRoutes } from './variableRoutes.js';

export const apiRoutes = Router();

// Central API composition keeps individual route modules small and domain-focused.
apiRoutes.use(bootstrapRoutes);
apiRoutes.use('/auth', authRoutes);
apiRoutes.use('/settings', settingsRoutes);
apiRoutes.use('/users', userRoutes);
apiRoutes.use('/groups', groupRoutes);
apiRoutes.use('/graph', graphRoutes);
apiRoutes.use('/help', helpRoutes);
apiRoutes.use('/assets', assetRoutes);
apiRoutes.use('/credentials', credentialRoutes);
apiRoutes.use('/hosts', hostRoutes);
apiRoutes.use('/folders', folderRoutes);
apiRoutes.use('/scripts', scriptRoutes);
apiRoutes.use('/variables', variableRoutes);
apiRoutes.use('/psadt', psadtRoutes);
apiRoutes.use('/packaging', packagingRoutes);
apiRoutes.use('/intune/applications', applicationRoutes);
apiRoutes.use('/intune', governanceRoutes);
apiRoutes.use('/runplans', runPlanRoutes);
apiRoutes.use('/jobs', jobRoutes);
apiRoutes.use('/logs', logRoutes);
