import { env } from "../Config";
import BadDataException from "../../Types/Exception/BadDataException";
export default class PricingPlan {
    static getPlans() {
        if (env("STRIPE_PUBLIC_KEY") &&
            env("STRIPE_PUBLIC_KEY").startsWith("pk_test")) {
            return [
                {
                    category: "Startup",
                    planId: "plan_GoWIYiX2L8hwzx",
                    type: "month",
                    amount: 25,
                    details: "$25 / Month / User",
                },
                {
                    category: "Startup",
                    planId: "plan_GoWIqpBpStiqQp",
                    type: "annual",
                    amount: 264,
                    details: "$22/mo per user paid annually. ",
                },
                {
                    category: "Growth",
                    planId: "plan_GoWKgxRnPPBJWy",
                    type: "month",
                    amount: 59,
                    details: "$59 / Month / User",
                },
                {
                    category: "Growth",
                    planId: "plan_GoWKiTdQ6NiQFw",
                    type: "annual",
                    amount: 588,
                    details: "$49/mo per user paid annually. ",
                },
                {
                    category: "Scale",
                    planId: "plan_H9Iox3l2YqLTDR",
                    type: "month",
                    amount: 99,
                    details: "$120 / Month / User",
                },
                {
                    category: "Scale",
                    planId: "plan_H9IlBKhsFz4hV2",
                    type: "annual",
                    amount: 1188,
                    details: "$99/mo per user paid annually. ",
                },
            ];
        }
        return [
            {
                category: "Startup",
                planId: "plan_GoVgVbvNdbWwlm",
                type: "month",
                amount: 25,
                details: "$25 / Month / User",
            },
            {
                category: "Startup",
                planId: "plan_GoVgJu5PKMLRJU",
                type: "annual",
                amount: 264,
                details: "$22/mo per user paid annually. ",
            },
            {
                category: "Growth",
                planId: "plan_GoVi9EIa6MU0fG",
                type: "month",
                amount: 59,
                details: "$59 / Month / User",
            },
            {
                category: "Growth",
                planId: "plan_GoViZshjqzZ0vv",
                type: "annual",
                amount: 588,
                details: "$49/mo per user paid annually. ",
            },
            {
                category: "Scale",
                planId: "plan_H9Ii6Qj3HLdtty",
                type: "month",
                amount: 99,
                details: "$120 / Month / User",
            },
            {
                category: "Scale",
                planId: "plan_H9IjvX2Flsvlcg",
                type: "annual",
                amount: 1188,
                details: "$99/mo per user paid annually. ",
            },
        ];
    }
    static getPlanById(id) {
        const plans = this.getPlans();
        const plan = plans.find((plan) => {
            return plan.planId === id;
        });
        if (plan) {
            return plan;
        }
        throw new BadDataException(`Plan with id ${id} not found`);
    }
}
//# sourceMappingURL=PricingPlan.js.map