/**
 * 项目状态枚举
 */
export enum ProjectStatus {
    /** 未开始 */
    UNSTARTED = 0,
    /** 进行中 */
    UNDERWAY = 1,
    /** 已暂停 */
    PAUSED = 2,
    /** 已完成 */
    FINISHED = 3
}

/**
 * 项目状态配置
 */
export interface ProjectStatusConfig {
    label: string;
    type: 'success' | 'info' | 'warning' | 'primary' | 'danger';
}

/**
 * 项目状态配置映射
 */
export const PROJECT_STATUS_CONFIG: Record<ProjectStatus, ProjectStatusConfig> = {
    [ProjectStatus.UNSTARTED]: {
        label: 'project.management.status.unstarted',
        type: 'info'
    },
    [ProjectStatus.UNDERWAY]: {
        label: 'project.management.status.underway',
        type: 'success'
    },
    [ProjectStatus.PAUSED]: {
        label: 'project.management.status.paused',
        type: 'warning'
    },
    [ProjectStatus.FINISHED]: {
        label: 'project.management.status.finished',
        type: 'primary'
    }
};

/**
 * 获取项目状态配置
 * @param status 状态值
 * @returns 状态配置
 */
export const getProjectStatusConfig = (status: number): ProjectStatusConfig | null => {
    return PROJECT_STATUS_CONFIG[status as ProjectStatus] || null;
};
