import React from 'react';
import {ProjectOutlined, RocketOutlined} from '@ant-design/icons';
import {ProjectGroupTypeEnum} from './types';

interface ProjectTypeInfo {
    type: ProjectGroupTypeEnum;
    label: string;
    color: string;
    icon: React.ReactNode;
}

// 获取项目组类型信息
export const getProjectTypeInfo = (type: ProjectGroupTypeEnum): ProjectTypeInfo => {
    switch (type) {
        case ProjectGroupTypeEnum.PRODUCT:
            return {
                type: ProjectGroupTypeEnum.PRODUCT,
                label: '产品型',
                color: '#1890ff',
                icon: <RocketOutlined/>,
            };
        case ProjectGroupTypeEnum.PROJECT:
            return {
                type: ProjectGroupTypeEnum.PROJECT,
                label: '项目型',
                color: '#52c41a',
                icon: <ProjectOutlined/>,
            };
        default:
            return {
                type: type,
                label: type || '未知',
                color: '#666666',
                icon: <ProjectOutlined/>,
            };
    }
}; 