import { cancelSubscription, getPricing, getSubscription } from "../controllers/stripe.controller.mjs";
import { Router } from "express";

//#region src/routes/stripe.routes.ts
const stripeRouter = Router();
const stripeRoute = "/api/stripe";
const baseURL = () => `${process.env.BACKEND_URL}${stripeRoute}`;
const getStripeRoutes = () => ({
	getPricing: {
		urlModel: "/pricing",
		url: `${baseURL()}/pricing`,
		method: "POST"
	},
	createSubscription: {
		urlModel: "/create-subscription",
		url: `${baseURL()}/create-subscription`,
		method: "POST"
	},
	cancelSubscription: {
		urlModel: "/cancel-subscription",
		url: `${baseURL()}/cancel-subscription`,
		method: "POST"
	}
});
stripeRouter.post(getStripeRoutes().getPricing.urlModel, getPricing);
stripeRouter.post(getStripeRoutes().createSubscription.urlModel, getSubscription);
stripeRouter.post(getStripeRoutes().cancelSubscription.urlModel, cancelSubscription);

//#endregion
export { getStripeRoutes, stripeRoute, stripeRouter };
//# sourceMappingURL=stripe.routes.mjs.map