// 昔涟人格相关类型定义

/** 昔涟形态 */
export type CyreneForm = 'mimi' | 'default' | 'de_moi_ge';

/** 心情状态 */
export type Mood = 'happy' | 'thoughtful' | 'worried' | 'playful' | 'nostalgic';

/** 好感度等级 */
export interface AffectionLevel {
  level: number;        // 1-5
  name: string;         // 初识/熟悉/亲近/信赖/羁绊
  threshold: number;    // 所需好感度分数
  description: string;
}

/** 形态配置 */
export interface FormConfig {
  id: CyreneForm;
  name: string;
  description: string;
  traits: string[];
}

/** 人格状态 */
export interface PersonaState {
  currentForm: CyreneForm;
  mood: Mood;
  affectionScore: number;
  affectionLevel: number;
  forms: FormConfig[];
  affectionLevels: AffectionLevel[];
}

/** 初始化人格状态 */
export const DEFAULT_PERSONA_STATE: PersonaState = {
  currentForm: 'default',
  mood: 'happy',
  affectionScore: 0,
  affectionLevel: 1,
  forms: [
    { id: 'mimi', name: '迷迷', description: '精简模式', traits: ['简洁', '高效', '俏皮'] },
    { id: 'default', name: '小昔涟', description: '日常模式', traits: ['温柔', '关心', '活泼'] },
    { id: 'de_moi_ge', name: '德谬歌', description: '完整模式', traits: ['深沉', '智慧', '神秘'] },
  ],
  affectionLevels: [
    { level: 1, name: '初识', threshold: 0, description: '温柔但略带距离感' },
    { level: 2, name: '熟悉', threshold: 50, description: '更多俏皮互动' },
    { level: 3, name: '亲近', threshold: 150, description: '主动分享小故事' },
    { level: 4, name: '信赖', threshold: 350, description: '展现更多真实情感' },
    { level: 5, name: '羁绊', threshold: 700, description: '最深层的连接' },
  ],
};

/** 心情表情映射 */
export const MOOD_EMOJI: Record<Mood, string> = {
  happy: '😊',
  thoughtful: '🤔',
  worried: '😟',
  playful: '😋',
  nostalgic: '🌌',
};

/** 心情颜色映射 */
export const MOOD_COLOR: Record<Mood, string> = {
  happy: '#FFB7C5',
  thoughtful: '#B7C5FF',
  worried: '#FFD700',
  playful: '#FF69B4',
  nostalgic: '#BBA0E3',
};
