export type WorkspaceGroup = "市场复盘" | "智能工具" | "个人";

export type Workspace = {
  key: string;
  title: string;
  mark: string;
  group: WorkspaceGroup;
  description: string;
};

export const workspaces: readonly Workspace[] = [
  { key: "emotion", title: "情绪周期", mark: "情", group: "市场复盘", description: "全市场情绪温度与阶段" },
  { key: "pool", title: "涨停池", mark: "涨", group: "市场复盘", description: "当日封板股票与结构" },
  { key: "broken", title: "炸板池", mark: "炸", group: "市场复盘", description: "触板未封股票与原因" },
  { key: "limit-down", title: "跌停板", mark: "跌", group: "市场复盘", description: "跌停风险与聚集" },
  { key: "yesterday", title: "昨日涨停", mark: "昨", group: "市场复盘", description: "昨日涨停次日反馈" },
  { key: "performance", title: "涨停表现", mark: "表", group: "市场复盘", description: "晋级、兑现与断板" },
  { key: "ladder", title: "市场天梯", mark: "梯", group: "市场复盘", description: "连板梯队与市场高度" },
  { key: "rotation", title: "板块轮动", mark: "转", group: "市场复盘", description: "热点迁移与板块成分" },
  { key: "auction", title: "集合竞价", mark: "竞", group: "市场复盘", description: "题材承接与竞价异动" },
  { key: "themes", title: "题材库", mark: "题", group: "市场复盘", description: "题材排行与成分股" },
  { key: "popularity", title: "人气热榜", mark: "热", group: "市场复盘", description: "双平台人气与共识" },
  { key: "dragon-list", title: "龙虎榜", mark: "榜", group: "市场复盘", description: "上榜明细与活跃席位" },
  { key: "screener", title: "智能选股", mark: "选", group: "智能工具", description: "阶段、策略与自定义选股" },
  { key: "mentor", title: "问师", mark: "师", group: "智能工具", description: "思维模型复盘对话" },
  { key: "heaven", title: "问天", mark: "天", group: "智能工具", description: "观势、观气与观心" },
  { key: "review", title: "我的复盘", mark: "复", group: "个人", description: "自选、日志与每日复盘" },
] as const;

export const workspaceGroups: readonly WorkspaceGroup[] = ["市场复盘", "智能工具", "个人"];

export function findWorkspace(key: string): Workspace | undefined {
  return workspaces.find((workspace) => workspace.key === key);
}
