import { SubscriptionType } from '../enums/types.enum'; export const getBenefits = (type: SubscriptionType) => { if (type === 'rss-addon') { return 'the ability to publish your content through RSS and automatically reach your audience'; } return 'access to the Screening Room with exclusive films, series, and music videos'; }; export const getPurchaseUrl = (type: SubscriptionType) => { const frontendUrl = process.env.FRONTEND_URL || 'https://indeehub.studio'; if (type === 'rss-addon') { return `${frontendUrl}/add-ons`; } return `${frontendUrl}/subscription`; }; export const getSubsctriptionName = (type: SubscriptionType) => { const formattedType = formatSubscriptionType(type); if (type === 'rss-addon') { return 'RSS Add-on'; } return formattedType + ' Subscription'; }; /** * Capitalizes the first letter of each word and removes hyphens. * Example: 'film-buff' => 'Film Buff' */ export const formatSubscriptionType = (type: SubscriptionType): string => { return type .split('-') .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(' '); };