type Translate = (key: string, options?: Record | string) => string; const FEATURE_LABELS: Record = { priority_support: { key: 'mobileDashboard.packageSummary.feature.priority_support', fallback: 'Priority support', }, custom_domain: { key: 'mobileDashboard.packageSummary.feature.custom_domain', fallback: 'Custom domain', }, analytics: { key: 'mobileDashboard.packageSummary.feature.analytics', fallback: 'Analytics', }, team_management: { key: 'mobileDashboard.packageSummary.feature.team_management', fallback: 'Team management', }, moderation_tools: { key: 'mobileDashboard.packageSummary.feature.moderation_tools', fallback: 'Moderation tools', }, prints: { key: 'mobileDashboard.packageSummary.feature.prints', fallback: 'Print uploads', }, photo_likes_enabled: { key: 'mobileDashboard.packageSummary.feature.photo_likes_enabled', fallback: 'Photo likes', }, event_checklist: { key: 'mobileDashboard.packageSummary.feature.event_checklist', fallback: 'Event checklist', }, advanced_analytics: { key: 'mobileDashboard.packageSummary.feature.advanced_analytics', fallback: 'Advanced analytics', }, branding_allowed: { key: 'mobileDashboard.packageSummary.feature.branding_allowed', fallback: 'Branding', }, watermark_allowed: { key: 'mobileDashboard.packageSummary.feature.watermark_allowed', fallback: 'Watermarks', }, }; export function getPackageFeatureLabel(feature: string, t: Translate): string { const entry = FEATURE_LABELS[feature]; if (entry) { return t(entry.key, entry.fallback); } return t(`mobileDashboard.packageSummary.feature.${feature}`, feature); } export function formatPackageLimit(value: number | null | undefined, t: Translate): string { if (value === null || value === undefined) { return t('mobileDashboard.packageSummary.unlimited', 'Unlimited'); } return String(value); }