const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
const require_controllers_newsletter_controller = require('../controllers/newsletter.controller.cjs');
let express = require("express");
express = require_rolldown_runtime.__toESM(express);

//#region src/routes/newsletter.routes.ts
const newsletterRouter = (0, express.Router)();
const newsletterRoute = "/api/newsletter";
const baseURL = () => `${process.env.BACKEND_URL}${newsletterRoute}`;
const getNewsletterRoutes = () => ({
	subscribeToNewsletter: {
		urlModel: "/subscribe",
		url: `${baseURL()}/subscribe`,
		method: "POST"
	},
	unsubscribeFromNewsletter: {
		urlModel: "/unsubscribe",
		url: `${baseURL()}/unsubscribe`,
		method: "POST"
	},
	getNewsletterStatus: {
		urlModel: "/status",
		url: `${baseURL()}/status`,
		method: "GET"
	}
});
newsletterRouter.post(getNewsletterRoutes().subscribeToNewsletter.urlModel, require_controllers_newsletter_controller.subscribeToNewsletter);
newsletterRouter.post(getNewsletterRoutes().unsubscribeFromNewsletter.urlModel, require_controllers_newsletter_controller.unsubscribeFromNewsletter);
newsletterRouter.get(getNewsletterRoutes().getNewsletterStatus.urlModel, require_controllers_newsletter_controller.getNewsletterStatus);

//#endregion
exports.getNewsletterRoutes = getNewsletterRoutes;
exports.newsletterRoute = newsletterRoute;
exports.newsletterRouter = newsletterRouter;
//# sourceMappingURL=newsletter.routes.cjs.map