(plan: string)
| 181 | * and new credit-tier names (`'pro_4000'`, `'team_8000'`). |
| 182 | */ |
| 183 | export function getPlanPricing(plan: string): { basePrice: number } { |
| 184 | if (isFree(plan)) return { basePrice: 0 } |
| 185 | if (isEnterprise(plan)) return { basePrice: getEnterpriseTierLimitPerSeat() } |
| 186 | |
| 187 | if (isPro(plan) || isTeam(plan)) { |
| 188 | const tierCredits = getPlanTierCredits(plan) |
| 189 | if (tierCredits > 0) return { basePrice: tierCredits / CREDIT_MULTIPLIER } |
| 190 | return { basePrice: isPro(plan) ? getProTierLimit() : getTeamTierLimitPerSeat() } |
| 191 | } |
| 192 | |
| 193 | return { basePrice: 0 } |
| 194 | } |
no test coverage detected