export type Plan = "free" | "pro" | "pro2x" | "pro4x" | "lifetime"; export interface PlanLimits { maxMonitors: number; minIntervalS: number; maxRegions: number; } const PLAN_LIMITS: Record = { free: { maxMonitors: 10, minIntervalS: 30, maxRegions: 1 }, pro: { maxMonitors: 200, minIntervalS: 5, maxRegions: 99 }, pro2x: { maxMonitors: 400, minIntervalS: 5, maxRegions: 99 }, pro4x: { maxMonitors: 800, minIntervalS: 5, maxRegions: 99 }, lifetime: { maxMonitors: 200, minIntervalS: 5, maxRegions: 99 }, }; export function getPlanLimits(plan: string): PlanLimits { return PLAN_LIMITS[plan as Plan] || PLAN_LIMITS.free; } export const PLAN_LABELS: Record = { free: "Free", pro: "Pro", pro2x: "Pro 2x", pro4x: "Pro 4x", lifetime: "Lifetime", }; export const PRO_MONTHLY_USD = 12; export const LIFETIME_USD = 140; export const PLAN_PRICING: Record = { pro: { label: "Pro", monthlyUsd: PRO_MONTHLY_USD }, pro2x: { label: "Pro 2x", monthlyUsd: PRO_MONTHLY_USD * 2 }, pro4x: { label: "Pro 4x", monthlyUsd: PRO_MONTHLY_USD * 4 }, lifetime: { label: "Lifetime", priceUsd: LIFETIME_USD }, }; export const COINS: Record = { btc: { label: "Bitcoin", ticker: "BTC", confirmations: 1, uri: "bitcoin" }, ltc: { label: "Litecoin", ticker: "LTC", confirmations: 1, uri: "litecoin" }, doge: { label: "Dogecoin", ticker: "DOGE", confirmations: 1, uri: "dogecoin" }, dash: { label: "Dash", ticker: "DASH", confirmations: 1, uri: "dash" }, bch: { label: "Bitcoin Cash", ticker: "BCH", confirmations: 0, uri: "bitcoincash" }, xec: { label: "eCash", ticker: "XEC", confirmations: 0, uri: "ecash" }, }; const PLAN_RANK: Record = { free: 0, pro: 1, lifetime: 1, pro2x: 2, pro4x: 3, }; export function planTier(plan: string): number { return PLAN_RANK[plan] ?? 0; } export const REGION_COLORS: Record = { "eu-central": "#3b82f6", "us-west": "#f59e0b", "default": "#6b7280", "__none__": "#6b7280", }; export const REGION_LABELS: Record = { "eu-central": "EU Central", "us-west": "US West", "default": "Default", }; export const REGIONS: [string, string][] = [ ["eu-central", "EU Central"], ["us-west", "US West"], ];