const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
const require_controllers_project_controller = require('../controllers/project.controller.cjs');
const require_controllers_projectAccessKey_controller = require('../controllers/projectAccessKey.controller.cjs');
let express = require("express");
express = require_rolldown_runtime.__toESM(express);

//#region src/routes/project.routes.ts
const projectRouter = (0, express.Router)();
const projectRoute = "/api/project";
const baseURL = () => `${process.env.BACKEND_URL}${projectRoute}`;
const getProjectRoutes = () => ({
	getProjects: {
		urlModel: "/",
		url: baseURL(),
		method: "GET"
	},
	addProject: {
		urlModel: "/",
		url: baseURL(),
		method: "POST"
	},
	updateProject: {
		urlModel: "/",
		url: baseURL(),
		method: "PUT"
	},
	updateProjectMembers: {
		urlModel: "/members",
		url: `${baseURL()}/members`,
		method: "PUT"
	},
	pushProjectConfiguration: {
		urlModel: "/configuration",
		url: `${baseURL()}/configuration`,
		method: "PUT"
	},
	deleteProject: {
		urlModel: "/",
		url: baseURL(),
		method: "DELETE"
	},
	selectProject: {
		urlModel: "/:projectId",
		url: ({ projectId }) => `${baseURL()}/${projectId}`,
		method: "PUT"
	},
	unselectProject: {
		urlModel: "/logout",
		url: `${baseURL()}/logout`,
		method: "POST"
	},
	addNewAccessKey: {
		urlModel: "/access_key",
		url: `${baseURL()}/access_key`,
		method: "POST"
	},
	refreshAccessKey: {
		urlModel: "/access_key",
		url: `${baseURL()}/access_key`,
		method: "PATCH"
	},
	deleteAccessKey: {
		urlModel: "/access_key",
		url: `${baseURL()}/access_key`,
		method: "DELETE"
	}
});
projectRouter.get(getProjectRoutes().getProjects.urlModel, require_controllers_project_controller.getProjects);
projectRouter.post(getProjectRoutes().addProject.urlModel, require_controllers_project_controller.addProject);
projectRouter.put(getProjectRoutes().updateProject.urlModel, require_controllers_project_controller.updateProject);
projectRouter.put(getProjectRoutes().updateProjectMembers.urlModel, require_controllers_project_controller.updateProjectMembers);
projectRouter.put(getProjectRoutes().pushProjectConfiguration.urlModel, require_controllers_project_controller.pushProjectConfiguration);
projectRouter.delete(getProjectRoutes().deleteProject.urlModel, require_controllers_project_controller.deleteProject);
projectRouter.post(getProjectRoutes().addNewAccessKey.urlModel, require_controllers_projectAccessKey_controller.addNewAccessKey);
projectRouter.patch(getProjectRoutes().refreshAccessKey.urlModel, require_controllers_projectAccessKey_controller.refreshAccessKey);
projectRouter.delete(getProjectRoutes().deleteAccessKey.urlModel, require_controllers_projectAccessKey_controller.deleteAccessKey);
projectRouter.post(getProjectRoutes().unselectProject.urlModel, require_controllers_project_controller.unselectProject);
projectRouter.put(getProjectRoutes().selectProject.urlModel, require_controllers_project_controller.selectProject);

//#endregion
exports.getProjectRoutes = getProjectRoutes;
exports.projectRoute = projectRoute;
exports.projectRouter = projectRouter;
//# sourceMappingURL=project.routes.cjs.map