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

//#region src/routes/stripe.routes.ts
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"
	}
});
const stripeRouter = async (fastify) => {
	fastify.post(getStripeRoutes().getPricing.urlModel, getPricing);
	fastify.post(getStripeRoutes().createSubscription.urlModel, getSubscription);
	fastify.post(getStripeRoutes().cancelSubscription.urlModel, cancelSubscription);
};

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