type PlanTemplate = {
  personaId: string;
  focus: string[];
  taskIds: string[];
};

(window as any).SummerPlanApp = (window as any).SummerPlanApp || {};
(window as any).SummerPlanApp.planDurations = [
  { days: 14, label: "14天轻量版" },
  { days: 21, label: "21天标准版" },
  { days: 30, label: "30天完整版" },
  { days: 45, label: "45天进阶版" },
  { days: 60, label: "60天超长版" }
];

(window as any).SummerPlanApp.stageDescriptions = [
  {
    id: "recover",
    name: "恢复期",
    label: "恢复状态",
    goal: "从高考紧绷状态中恢复过来，重新建立生活节奏。",
    modules: ["补觉恢复", "整理房间", "和朋友聚会", "短途旅行", "恢复正常作息", "AI生成轻松清单"]
  },
  {
    id: "explore",
    name: "探索期",
    label: "探索方向",
    goal: "找到自己感兴趣的方向，不盲目跟风。",
    modules: ["了解大学生活", "了解目标专业", "做一次职业兴趣测试", "看大学经验分享", "AI整理专业介绍"]
  },
  {
    id: "improve",
    name: "提升期",
    label: "技能提升",
    goal: "选择 1-2 个重点方向，真正做出一点成果。",
    modules: ["AI基础入门", "英语打卡", "PPT基础", "剪辑入门", "健身打卡", "自媒体小作品"]
  },
  {
    id: "prepare",
    name: "开学准备期",
    label: "开学准备",
    goal: "从暑假状态切换到准大学生状态。",
    modules: ["准备证件材料", "准备宿舍用品", "写大学自我介绍", "制定大学第一个月计划", "AI生成开学清单"]
  }
];

(window as any).SummerPlanApp.planTemplates = {
  free: {
    personaId: "free",
    focus: ["睡眠恢复", "旅行记录", "轻量成长", "开学准备"],
    taskIds: ["sleep-reset", "room-clean", "travel", "watch-read", "ai-list", "college-list"]
  },
  leader: {
    personaId: "leader",
    focus: ["AI工具", "英语基础", "办公技能", "大学适应"],
    taskIds: ["ai-basic", "english", "ppt-basic", "major-explore", "month-plan", "intro"]
  },
  skill: {
    personaId: "skill",
    focus: ["作品输出", "办公技能", "内容表达", "AI辅助"],
    taskIds: ["ai-basic", "ppt-basic", "editing-basic", "xiaohongshu", "ai-ppt", "portfolio"]
  },
  money: {
    personaId: "money",
    focus: ["兼职安全", "简历表达", "时间管理", "财务意识"],
    taskIds: ["parttime-safe", "ai-resume", "budget", "driving", "intro", "excel-basic"]
  },
  comeback: {
    personaId: "comeback",
    focus: ["作息恢复", "英语打卡", "学习方法", "每周复盘"],
    taskIds: ["sleep-reset", "english", "study-method", "ai-daily-plan", "weekly-review", "month-plan"]
  },
  social: {
    personaId: "social",
    focus: ["自我介绍", "宿舍沟通", "表达练习", "社团准备"],
    taskIds: ["intro", "dorm-rule", "ai-communication", "xiaohongshu", "watch-read", "month-plan"]
  },
  explore: {
    personaId: "explore",
    focus: ["兴趣探索", "专业认知", "轻量尝试", "记录复盘"],
    taskIds: ["major-explore", "ai-major", "watch-read", "xiaohongshu", "weekly-review", "ai-basic"]
  },
  life: {
    personaId: "life",
    focus: ["宿舍准备", "生活技能", "基础理财", "开学清单"],
    taskIds: ["room-clean", "cook", "budget", "college-list", "dorm-rule", "ai-list"]
  },
  interest: {
    personaId: "interest",
    focus: ["旅行体验", "阅读观影", "拍照记录", "兴趣作品"],
    taskIds: ["travel", "watch-read", "xiaohongshu", "editing-basic", "ai-major", "portfolio"]
  }
} as Record<string, PlanTemplate>;
