'use client';

import { Tag } from 'antd';
import React from 'react';
import type { Sprint } from '@/types';
import {
    SPRINT_HEALTH_LABELS,
    getSprintHealth,
    getSprintHealthTagColor,
} from './sprintHealth';

export function renderSprintHealthTag(s: Sprint): React.ReactNode {
    const level = getSprintHealth(s);

    return <Tag color={getSprintHealthTagColor(level)}>{SPRINT_HEALTH_LABELS[level]}</Tag>;
}
