"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRoutes = void 0;
const express_1 = require("express");
const device_routes_1 = require("../../interface/routes/device.routes");
const wallet_routes_1 = require("../../interface/routes/wallet.routes");
const network_routes_1 = require("../../interface/routes/network.routes");
const token_routes_1 = require("../../interface/routes/token.routes");
const balance_routes_1 = require("../../interface/routes/balance.routes");
const transaction_routes_1 = require("../../interface/routes/transaction.routes");
const admin_routes_1 = require("../../interface/routes/admin.routes");
const image_routes_1 = require("../../interface/routes/image.routes");
const address_routes_1 = require("../../interface/routes/address.routes");
/**
 * Compose all resource routers.
 *
 * - `apiRouter` contains the authenticated/public API endpoints under `/api/v1`.
 * - `imageRouter` contains the public image serving endpoint under `/images`.
 *
 * @param controllers - All HTTP controllers created by the composition root.
 * @param middlewares - Shared middlewares including the strict rate limiter.
 * @returns Both routers to be mounted by `createApp`.
 */
const createRoutes = (controllers, middlewares) => {
    const apiRouter = (0, express_1.Router)();
    apiRouter.use((0, device_routes_1.createDeviceRoutes)(controllers.deviceController));
    apiRouter.use((0, wallet_routes_1.createWalletRoutes)(controllers.walletController, middlewares.strictRateLimiter));
    apiRouter.use((0, network_routes_1.createNetworkRoutes)(controllers.networkController));
    apiRouter.use((0, token_routes_1.createTokenRoutes)(controllers.tokenController));
    apiRouter.use((0, balance_routes_1.createBalanceRoutes)(controllers.balanceController));
    apiRouter.use((0, transaction_routes_1.createTransactionRoutes)(controllers.transactionController));
    apiRouter.use((0, address_routes_1.createAddressRoutes)(controllers.addressController));
    apiRouter.use((0, admin_routes_1.createAdminRoutes)(controllers.adminController));
    const imageRouter = (0, image_routes_1.createImageRoutes)(controllers.imageController);
    return { apiRouter, imageRouter };
};
exports.createRoutes = createRoutes;
//# sourceMappingURL=routes.factory.js.map