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

//#region src/routes/organization.routes.ts
const organizationRouter = (0, express.Router)();
const organizationRoute = "/api/organization";
const baseURL = () => `${process.env.BACKEND_URL}${organizationRoute}`;
const getOrganizationRoutes = () => ({
	getOrganizations: {
		urlModel: "/",
		url: baseURL(),
		method: "GET"
	},
	addOrganization: {
		urlModel: "/",
		url: baseURL(),
		method: "POST"
	},
	updateOrganization: {
		urlModel: "/",
		url: baseURL(),
		method: "PUT"
	},
	updateOrganizationMembers: {
		urlModel: "/members",
		url: `${baseURL()}/members`,
		method: "PUT"
	},
	updateOrganizationMembersById: {
		urlModel: "/:organizationId/members",
		url: ({ organizationId }) => `${baseURL()}/${organizationId}/members`,
		method: "PUT"
	},
	addOrganizationMember: {
		urlModel: "/member",
		url: `${baseURL()}/member`,
		method: "POST"
	},
	deleteOrganization: {
		urlModel: "/",
		url: baseURL(),
		method: "DELETE"
	},
	selectOrganization: {
		urlModel: "/:organizationId",
		url: ({ organizationId }) => `${baseURL()}/${organizationId}`,
		method: "PUT"
	},
	unselectOrganization: {
		urlModel: "/logout",
		url: `${baseURL()}/logout`,
		method: "POST"
	}
});
organizationRouter.get(getOrganizationRoutes().getOrganizations.urlModel, require_controllers_organization_controller.getOrganizations);
organizationRouter.post(getOrganizationRoutes().addOrganization.urlModel, require_controllers_organization_controller.addOrganization);
organizationRouter.put(getOrganizationRoutes().updateOrganization.urlModel, require_controllers_organization_controller.updateOrganization);
organizationRouter.put(getOrganizationRoutes().updateOrganizationMembers.urlModel, require_controllers_organization_controller.updateOrganizationMembers);
organizationRouter.put(getOrganizationRoutes().updateOrganizationMembersById.urlModel, require_controllers_organization_controller.updateOrganizationMembersById);
organizationRouter.post(getOrganizationRoutes().addOrganizationMember.urlModel, require_controllers_organization_controller.addOrganizationMember);
organizationRouter.delete(getOrganizationRoutes().deleteOrganization.urlModel, require_controllers_organization_controller.deleteOrganization);
organizationRouter.put(getOrganizationRoutes().selectOrganization.urlModel, require_controllers_organization_controller.selectOrganization);
organizationRouter.post(getOrganizationRoutes().unselectOrganization.urlModel, require_controllers_organization_controller.unselectOrganization);

//#endregion
exports.getOrganizationRoutes = getOrganizationRoutes;
exports.organizationRoute = organizationRoute;
exports.organizationRouter = organizationRouter;
//# sourceMappingURL=organization.routes.cjs.map