//#region src/utils/plan.ts
/**
* Retrieves the plan type based on the price ID.
* @param priceId - The price ID to retrieve the plan type from.
* @returns The plan type and period.
*/
const retrievePlanInformation = (priceId) => {
	switch (priceId) {
		case process.env.STRIPE_PREMIUM_YEARLY_PRICE_ID: return {
			period: "YEARLY",
			type: "PREMIUM"
		};
		case process.env.STRIPE_PREMIUM_MONTHLY_PRICE_ID: return {
			period: "MONTHLY",
			type: "PREMIUM"
		};
		case process.env.STRIPE_ENTERPRISE_YEARLY_PRICE_ID: return {
			period: "YEARLY",
			type: "ENTERPRISE"
		};
		case process.env.STRIPE_ENTERPRISE_MONTHLY_PRICE_ID: return {
			period: "MONTHLY",
			type: "ENTERPRISE"
		};
		default: return {
			period: void 0,
			type: "FREE"
		};
	}
};
const planDetails = {
	FREE: {
		numberOfOrganizationUsers: 1,
		numberOfProjects: 1,
		totalStorage: 100,
		SeoAI: false,
		contentAI: false
	},
	PREMIUM: {
		numberOfOrganizationUsers: 20,
		numberOfProjects: 10,
		totalStorage: 500,
		SeoAI: false,
		contentAI: true
	},
	ENTERPRISE: {
		numberOfOrganizationUsers: void 0,
		numberOfProjects: void 0,
		totalStorage: void 0,
		SeoAI: true,
		contentAI: true
	}
};
const getPlanDetails = (plan) => {
	if (plan?.status !== "active") return planDetails.FREE;
	return planDetails[plan.type];
};

//#endregion
export { getPlanDetails, retrievePlanInformation };
//# sourceMappingURL=plan.mjs.map