/**
 * 统一导航配置
 * Header 和 Sidebar 共用此数据源
 */
import React from "react";
import {
  DashboardOutlined,
  VideoCameraOutlined,
  FileOutlined,
  AudioOutlined,
  FileTextOutlined,
  TrophyOutlined,
  AppstoreOutlined,
  HistoryOutlined,
  ControlOutlined,
  CrownOutlined,
  ScanOutlined,
  EditOutlined,
  FolderOutlined,
} from "@ant-design/icons";

/** 导航项定义 */
export interface NavItem {
  key: string;
  label: string;
  path: string;
  icon: React.ReactNode;
}

/** 导航分组定义 */
export interface NavGroup {
  title: string;
  items: NavItem[];
}

/**
 * 扁平导航列表（Header 使用）
 */
export const NAV_ITEMS: NavItem[] = [
  {
    key: "dashboard",
    label: "概览",
    path: "/app/dashboard",
    icon: <DashboardOutlined />,
  },
  {
    key: "assets",
    label: "素材库",
    path: "/app/assets",
    icon: <FileOutlined />,
  },
  {
    key: "titles",
    label: "标题库",
    path: "/app/titles",
    icon: <FileTextOutlined />,
  },
  {
    key: "voices",
    label: "配音库",
    path: "/app/voices",
    icon: <AudioOutlined />,
  },
  {
    key: "voice-clone",
    label: "我的音色",
    path: "/app/voice-clone",
    icon: <AudioOutlined />,
  },
  {
    key: "voice-materials",
    label: "配音素材库",
    path: "/app/voice-materials",
    icon: <AudioOutlined />,
  },
  {
    key: "templates",
    label: "模板库",
    path: "/app/templates",
    icon: <AppstoreOutlined />,
  },
  {
    key: "editing-planner",
    label: "剪辑编辑器",
    path: "/app/editing-planner",
    icon: <EditOutlined />,
  },
  {
    key: "my-templates",
    label: "我的模板",
    path: "/app/my-templates",
    icon: <FolderOutlined />,
  },
  {
    key: "generate",
    label: "一键生成",
    path: "/app/generate",
    icon: <VideoCameraOutlined />,
  },
  {
    key: "history",
    label: "任务历史",
    path: "/app/history",
    icon: <HistoryOutlined />,
  },
  {
    key: "products",
    label: "成品库",
    path: "/app/products",
    icon: <TrophyOutlined />,
  },
  {
    key: "duplication",
    label: "查重",
    path: "/app/duplication",
    icon: <ScanOutlined />,
  },
];

/**
 * 分组导航列表（Sidebar 使用）
 */
export const NAV_GROUPS: NavGroup[] = [
  {
    title: "创作工具",
    items: [
      {
        key: "dashboard",
        label: "首页",
        path: "/app/dashboard",
        icon: <DashboardOutlined />,
      },
      {
        key: "generate",
        label: "一键生成",
        path: "/app/generate",
        icon: <VideoCameraOutlined />,
      },
    ],
  },
  {
    title: "资源管理",
    items: [
      {
        key: "assets",
        label: "素材库",
        path: "/app/assets",
        icon: <FileOutlined />,
      },
      {
        key: "voices",
        label: "配音库",
        path: "/app/voices",
        icon: <AudioOutlined />,
      },
      {
        key: "voice-clone",
        label: "我的音色",
        path: "/app/voice-clone",
        icon: <AudioOutlined />,
      },
      {
        key: "voice-materials",
        label: "配音素材库",
        path: "/app/voice-materials",
        icon: <AudioOutlined />,
      },
      {
        key: "titles",
        label: "标题库",
        path: "/app/titles",
        icon: <FileTextOutlined />,
      },
      {
        key: "products",
        label: "成片库",
        path: "/app/products",
        icon: <TrophyOutlined />,
      },
      {
        key: "templates",
        label: "模板库",
        path: "/app/templates",
        icon: <AppstoreOutlined />,
      },
    ],
  },
  {
    title: "系统",
    items: [
      {
        key: "history",
        label: "任务历史",
        path: "/app/history",
        icon: <HistoryOutlined />,
      },
      {
        key: "admin",
        label: "控制台",
        path: "/app/admin",
        icon: <ControlOutlined />,
      },
      {
        key: "subscription",
        label: "订阅管理",
        path: "/app/subscription",
        icon: <CrownOutlined />,
      },
    ],
  },
];
