"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPlansForPlatform = exports.getPlatformByCode = exports.getPaymentPlan = exports.NETWORK_LABELS = exports.PAYMENT_PLANS = exports.PLATFORM_OPTIONS = exports.PAYMENT_STATUSES = exports.PAYMENT_NETWORKS = void 0;
exports.PAYMENT_NETWORKS = ["bsc", "base", "avalanche", "polygon", "tron"];
exports.PAYMENT_STATUSES = ["pending", "confirmed", "expired", "failed", "late_payment"];
const PLAN_TIERS = [
    { suffix: "monthly", label: "Monthly", durationDays: 30, isLifetime: false, dailyRequestLimit: 3 },
    { suffix: "yearly", label: "Yearly", durationDays: 365, isLifetime: false, dailyRequestLimit: 10 },
    { suffix: "lifetime", label: "Lifetime", isLifetime: true, dailyRequestLimit: 21 }
];
const buildPlatformPlans = (platformCode, platformName, prices) => PLAN_TIERS.map((tier) => ({
    code: `${platformCode}-${tier.suffix}`,
    name: `${platformName} — ${tier.label}`,
    amountUsdt: prices[tier.suffix],
    durationDays: tier.durationDays,
    isLifetime: tier.isLifetime,
    platformCode,
    dailyRequestLimit: tier.dailyRequestLimit
}));
exports.PLATFORM_OPTIONS = [
    {
        code: "uniswap-v2",
        name: "Uniswap V2",
        plans: buildPlatformPlans("uniswap-v2", "Uniswap V2", {
            monthly: "250",
            yearly: "2500",
            lifetime: "5820"
        })
    },
    {
        code: "uniswap-v3",
        name: "Uniswap V3",
        plans: buildPlatformPlans("uniswap-v3", "Uniswap V3", {
            monthly: "300",
            yearly: "3000",
            lifetime: "6750"
        })
    },
    {
        code: "sushiswap",
        name: "SushiSwap",
        plans: buildPlatformPlans("sushiswap", "SushiSwap", {
            monthly: "200",
            yearly: "2000",
            lifetime: "4272"
        })
    },
    {
        code: "kyber",
        name: "Kyber Swap",
        plans: buildPlatformPlans("kyber", "Kyber Swap", {
            monthly: "220",
            yearly: "2200",
            lifetime: "4500"
        })
    },
    {
        code: "lychee",
        name: "Lychee Finance",
        plans: buildPlatformPlans("lychee", "Lychee Finance", {
            monthly: "369.99",
            yearly: "2999.99",
            lifetime: "3599.99"
        })
    },
    {
        code: "trader-joe",
        name: "Trader Joe",
        plans: buildPlatformPlans("trader-joe", "Trader Joe", {
            monthly: "399.99",
            yearly: "3999.99",
            lifetime: "5199.99"
        })
    },
    {
        code: "pancakeswap",
        name: "PancakeSwap Finance",
        plans: buildPlatformPlans("pancakeswap", "PancakeSwap Finance", {
            monthly: "540.99",
            yearly: "4499.99",
            lifetime: "8199.99"
        })
    },
    {
        code: "forex",
        name: "Forex",
        plans: buildPlatformPlans("forex", "Forex", {
            monthly: "550",
            yearly: "4599",
            lifetime: "8200"
        })
    },
    {
        code: "stocks",
        name: "Stocks",
        plans: buildPlatformPlans("stocks", "Stocks", {
            monthly: "175",
            yearly: "1800",
            lifetime: "3200"
        })
    }
];
exports.PAYMENT_PLANS = exports.PLATFORM_OPTIONS.flatMap((platform) => platform.plans);
exports.NETWORK_LABELS = {
    bsc: { name: "BNB Smart Chain", standard: "BEP-20 USDT" },
    base: { name: "Base", standard: "ERC-20 USDT" },
    avalanche: { name: "Avalanche C-Chain", standard: "ERC-20 USDT" },
    polygon: { name: "Polygon", standard: "PoS ERC-20 USDT" },
    tron: { name: "Tron Network", standard: "TRC-20 USDT" }
};
const getPaymentPlan = (code) => {
    return exports.PAYMENT_PLANS.find((plan) => plan.code === code);
};
exports.getPaymentPlan = getPaymentPlan;
const getPlatformByCode = (code) => {
    return exports.PLATFORM_OPTIONS.find((platform) => platform.code === code);
};
exports.getPlatformByCode = getPlatformByCode;
const getPlansForPlatform = (code) => {
    return (0, exports.getPlatformByCode)(code)?.plans ?? [];
};
exports.getPlansForPlatform = getPlansForPlatform;
