// Subscription plans. Mirrors FlowAPI.Application/Services/Plans.cs — keep both in sync. export const PLAN_FREE = 'Free'; export const PLAN_PLUS = 'Plus'; export const PLUS_PRICE_USD = 10; export const FREE_LIMITS = { boards: 5, nodesPerBoard: 300, guestsPerBoard: 2, templates: 3, }; // Legacy tiers ("Pro", "Ultra") are treated as Plus. export const normalizePlan = (tier) => !tier || String(tier).trim().toLowerCase() === 'free' ? PLAN_FREE : PLAN_PLUS; export const isPlus = (user) => normalizePlan(user?.subscriptionTier) === PLAN_PLUS; export const limitFor = (user, key) => (isPlus(user) ? Infinity : FREE_LIMITS[key]);