import type { CategoryType } from '../models/category';

export const CATEGORIES: CategoryType[] = [
    {
        id: 'math',
        name: '数感启蒙',
        icon: '📐',
        color: '#e3f2fd',
        gradient: ['#fff9c4', '#fff176'],
    },
    {
        id: 'chinese',
        name: '趣味识字',
        icon: '✏️',
        color: '#e8f5e9',
        gradient: ['#c8e6c9', '#a5d6a7'],
    },
    {
        id: 'english',
        name: '英语启蒙',
        icon: '🔤',
        color: '#e0f7fa',
        gradient: ['#b2ebf2', '#80deea'],
    },
    // {
    //     id: 'focus',
    //     name: '专注力',
    //     icon: '🧩',
    //     color: '#f3e5f5',
    //     gradient: ['#e1bee7', '#ce93d8'],
    // },
    {
        id: 'puzzle',
        name: '益智游戏',
        icon: '🧩',
        color: '#fff3e0',
        gradient: ['#ffe0b2', '#ffcc80'],
    },
    {
        id: 'craft',
        name: '创意手工',
        icon: '🌈',
        color: '#fce4ec',
        gradient: ['#f8bbd0', '#f48fb1'],
    },
];

export function getCategoryById(id: string): CategoryType | undefined {
    return CATEGORIES.find((c) => c.id === id);
}

export function getCategoryName(id: string): string {
    return getCategoryById(id)?.name || id;
}
