35 lines
796 B
TypeScript
35 lines
796 B
TypeScript
/**
|
|
* SeasonStatusDisplay
|
|
*
|
|
* Deterministic display logic for season status.
|
|
*/
|
|
|
|
export interface SeasonStatusDisplayData {
|
|
color: string;
|
|
bg: string;
|
|
label: string;
|
|
}
|
|
|
|
export class SeasonStatusDisplay {
|
|
private static readonly CONFIG: Record<string, SeasonStatusDisplayData> = {
|
|
active: {
|
|
color: 'text-performance-green',
|
|
bg: 'bg-performance-green/10',
|
|
label: 'Active Season'
|
|
},
|
|
upcoming: {
|
|
color: 'text-warning-amber',
|
|
bg: 'bg-warning-amber/10',
|
|
label: 'Starting Soon'
|
|
},
|
|
completed: {
|
|
color: 'text-gray-400',
|
|
bg: 'bg-gray-400/10',
|
|
label: 'Season Ended'
|
|
},
|
|
};
|
|
|
|
static getDisplay(status: 'active' | 'upcoming' | 'completed'): SeasonStatusDisplayData {
|
|
return this.CONFIG[status];
|
|
}
|
|
} |