Files
gridpilot.gg/adapters/bootstrap/IncidentConfig.ts
2025-12-26 00:20:53 +01:00

19 lines
381 B
TypeScript

/**
* Incident Configuration
*
* UI display configuration for incident badges
*/
export interface IncidentConfigData {
color: string;
}
export const getIncidentBadgeColor = (incidents: number): string => {
if (incidents === 0) return 'green';
if (incidents <= 2) return 'yellow';
return 'red';
};
export const incidentConfig = {
getIncidentBadgeColor,
} as const;