import { Router } from "express";
import { getRoleTemplates, getRoleTemplate } from "../services/role-templates.js";
export function roleTemplateRoutes() {
    const router = Router();
    router.get("/role-templates", (_req, res) => {
        res.json(getRoleTemplates());
    });
    router.get("/role-templates/:id", (req, res) => {
        const template = getRoleTemplate(req.params.id);
        if (!template) {
            res.status(404).json({ error: "Role template not found" });
            return;
        }
        res.json(template);
    });
    return router;
}
//# sourceMappingURL=role-templates.js.map