const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
const require_controllers_user_controller = require('../controllers/user.controller.cjs');
let express = require("express");

//#region src/routes/user.routes.ts
const userRouter = (0, express.Router)();
const userRoute = "/api/user";
const baseURL = () => `${process.env.BACKEND_URL}${userRoute}`;
const getUserRoutes = () => ({
	getUsers: {
		urlModel: "/",
		url: baseURL(),
		method: "GET"
	},
	updateUser: {
		urlModel: "/",
		url: baseURL(),
		method: "PUT"
	},
	createUser: {
		urlModel: "/",
		url: baseURL(),
		method: "POST"
	},
	getUserById: {
		urlModel: "/:userId",
		url: ({ userId }) => `${baseURL()}/${userId}`,
		method: "GET"
	},
	getUserByEmail: {
		urlModel: "/email/:email",
		url: ({ email }) => `${baseURL()}/email/${email}`,
		method: "GET"
	},
	deleteUser: {
		urlModel: "/:userId",
		url: ({ userId }) => `${baseURL()}/${userId}`,
		method: "DELETE"
	},
	verifyEmailStatusSSE: {
		urlModel: "/verify-email-status/:userId",
		url: ({ userId }) => `${baseURL()}/verify-email-status/${userId}`,
		method: "GET"
	}
});
userRouter.get(getUserRoutes().getUsers.urlModel, require_controllers_user_controller.getUsers);
userRouter.put(getUserRoutes().updateUser.urlModel, require_controllers_user_controller.updateUser);
userRouter.post(getUserRoutes().createUser.urlModel, require_controllers_user_controller.createUser);
userRouter.get(getUserRoutes().getUserById.urlModel, require_controllers_user_controller.getUserById);
userRouter.get(getUserRoutes().getUserByEmail.urlModel, require_controllers_user_controller.getUserByEmail);
userRouter.delete(getUserRoutes().deleteUser.urlModel, require_controllers_user_controller.deleteUser);
userRouter.get(getUserRoutes().verifyEmailStatusSSE.urlModel, require_controllers_user_controller.verifyEmailStatusSSE);

//#endregion
exports.getUserRoutes = getUserRoutes;
exports.userRoute = userRoute;
exports.userRouter = userRouter;
//# sourceMappingURL=user.routes.cjs.map