do to formatters

This commit is contained in:
2026-01-24 01:07:43 +01:00
parent ae59df61eb
commit 891b3cf0ee
140 changed files with 656 additions and 1159 deletions

View File

@@ -0,0 +1,38 @@
/**
* OnboardingStatusDisplay
*
* Deterministic mapping of onboarding status to display labels and variants.
*/
export class OnboardingStatusFormatter {
/**
* Maps onboarding success status to display label.
*/
static statusLabel(success: boolean): string {
return success ? 'Onboarding Complete' : 'Onboarding Failed';
}
/**
* Maps onboarding success status to badge variant.
*/
static statusVariant(success: boolean): string {
return success ? 'performance-green' : 'racing-red';
}
/**
* Maps onboarding success status to icon.
*/
static statusIcon(success: boolean): string {
return success ? '✅' : '❌';
}
/**
* Maps onboarding success status to message.
*/
static statusMessage(success: boolean, errorMessage?: string): string {
if (success) {
return 'Your onboarding has been completed successfully.';
}
return errorMessage || 'Failed to complete onboarding. Please try again.';
}
}