import type { PaywallPlan } from '@funnelsgrove/payments'; import type { StepPaywallLocaleContent } from '@/steps/content/step-32-paywall.content'; type Props = { plan: Pick | null; hasActiveDiscount: boolean; copy: StepPaywallLocaleContent['checkout']; catalogLabels: Record; }; export function PaywallRenewalDisclaimer({ plan, hasActiveDiscount, copy, catalogLabels }: Props) { if (!plan) return

; const count = Math.max(1, plan.billingIntervalCount || 1); const cadenceCopy = plan.billingInterval ? copy.cadence[plan.billingInterval] : null; const cadence = cadenceCopy ? (count === 1 ? cadenceCopy.one : cadenceCopy.many).replace('{count}', String(count)) : copy.cadenceFallback; const text = copy.renewalConsentTemplate .replace('{intro}', hasActiveDiscount ? copy.discountedIntroLabel : copy.selectedIntroLabel) .replace('{amount}', catalogLabels[plan.priceLabel] ?? plan.priceLabel) .replace('{cadence}', cadence); return

{text}

; }