export type SidebarTrigger = {
  value: string;          // 官方配置标识
  target: SidebarPanel;   // React 内部面板 key
  label: string;
  iconClass: string;
  visible?: boolean;      // 可选，默认 true；官方之外的扩展可设为 false 不显示在触发条
};

export type SidebarPanel =
  | "style"
  | "base"
  | "theme"
  | "structure"
  | "outline"
  | "settings"
  | "icons"
  | "formula"
  | "note"
  | "ai";

// 侧栏触发配置，来源于官方 config/zh.js 的 sidebarTriggerList，保持顺序
export const sidebarTriggers: SidebarTrigger[] = [
  { value: "nodeStyle", target: "style", label: "节点样式", iconClass: "iconzhuti" },
  { value: "baseStyle", target: "base", label: "基础样式", iconClass: "iconyangshi" },
  { value: "theme", target: "theme", label: "主题", iconClass: "iconjingzi" },
  { value: "structure", target: "structure", label: "结构", iconClass: "iconjiegou" },
  { value: "outline", target: "outline", label: "大纲", iconClass: "iconfuhao-dagangshu" },
  { value: "shortcutKey", target: "settings", label: "快捷键/设置", iconClass: "iconjianpan" },
  // 扩展：图标/公式/备注/AI，默认全部可见，保持和官方一致
  { value: "icons", target: "icons", label: "图标/贴纸", iconClass: "iconxiaolian", visible: true },
  { value: "formula", target: "formula", label: "公式", iconClass: "icongongshi", visible: true },
  { value: "note", target: "note", label: "备注", iconClass: "iconflow-Mark", visible: true },
  { value: "ai", target: "ai", label: "AI", iconClass: "iconstar", visible: true },
];

export const sidebarTitles: Record<SidebarPanel, string> = {
  style: "节点样式",
  base: "基础样式",
  theme: "主题",
  structure: "结构",
  outline: "大纲",
  settings: "设置",
  icons: "图标/贴纸",
  formula: "公式",
  note: "备注",
  ai: "AI 对话",
};
