export type GrowthGrade = 'A+' | 'A' | 'A-' | 'B' | 'C' | 'D';

export const GRADE_STYLES: Record<GrowthGrade, string> = {
    'A+': 'border-emerald-500/40 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400',
    A: 'border-green-500/40 bg-green-500/15 text-green-700 dark:text-green-400',
    'A-': 'border-lime-500/40 bg-lime-500/15 text-lime-700 dark:text-lime-400',
    B: 'border-amber-500/40 bg-amber-500/15 text-amber-800 dark:text-amber-400',
    C: 'border-orange-500/40 bg-orange-500/15 text-orange-700 dark:text-orange-400',
    D: 'border-red-500/40 bg-red-500/15 text-red-700 dark:text-red-400',
};

export const GRADE_LABELS: Record<GrowthGrade, string> = {
    'A+': 'Excellent',
    A: 'Strong',
    'A-': 'Good',
    B: 'Fair',
    C: 'Needs attention',
    D: 'Needs attention',
};

export function isGrowthGrade(
    value: string | null | undefined,
): value is GrowthGrade {
    return (
        value === 'A+' ||
        value === 'A' ||
        value === 'A-' ||
        value === 'B' ||
        value === 'C' ||
        value === 'D'
    );
}
