15 lines
358 B
TypeScript
15 lines
358 B
TypeScript
export class MedalDisplay {
|
|
static getVariant(position: number): 'warning' | 'low' | 'high' {
|
|
switch (position) {
|
|
case 1: return 'warning';
|
|
case 2: return 'high';
|
|
case 3: return 'warning';
|
|
default: return 'low';
|
|
}
|
|
}
|
|
|
|
static getMedalIcon(position: number): string | null {
|
|
return position <= 3 ? '🏆' : null;
|
|
}
|
|
}
|