import type { Component } from "vue";
import {
  Bell,
  Calendar,
  Checked,
  Collection,
  Cpu,
  DataBoard,
  Files,
  FolderOpened,
  Guide,
  MapLocation,
  Monitor,
  Position,
  VideoPlay
} from "@element-plus/icons-vue";

export type NavigationItem = {
  path: string;
  label: string;
  description: string;
  icon: Component;
};

export type NavigationGroup = {
  label: string;
  items: NavigationItem[];
};

export const navigationGroups: NavigationGroup[] = [
  {
    label: "态势",
    items: [
      { path: "/overview", label: "工作总览", description: "指标与待办", icon: DataBoard },
      { path: "/gis", label: "GIS 态势", description: "线路空间态势", icon: MapLocation }
    ]
  },
  {
    label: "巡检",
    items: [
      { path: "/runs", label: "全链路运行", description: "运行与回放", icon: VideoPlay },
      { path: "/planning", label: "巡检计划", description: "周期与对象", icon: Calendar },
      { path: "/tasks", label: "巡检任务", description: "任务与航线", icon: Files },
      { path: "/routes", label: "航线中心", description: "航点与发布", icon: Guide },
      { path: "/uav-operations", label: "无人机运行", description: "厂商与飞行", icon: Position },
      { path: "/resources", label: "数据资源", description: "接入与质量", icon: FolderOpened }
    ]
  },
  {
    label: "研判",
    items: [
      { path: "/analysis", label: "智能分析", description: "推理与规则", icon: Cpu },
      { path: "/alarms", label: "告警中心", description: "告警研判", icon: Bell }
    ]
  },
  {
    label: "闭环",
    items: [
      { path: "/workorders", label: "工单中心", description: "派发与复核", icon: Checked },
      { path: "/algorithm-assets", label: "样本与模型", description: "数据和版本", icon: Collection },
      { path: "/archives", label: "报告归档", description: "成果与能力", icon: FolderOpened }
    ]
  },
  {
    label: "系统",
    items: [
      { path: "/operations", label: "系统运维", description: "健康与事件", icon: Monitor }
    ]
  }
];

export const navigationItems = navigationGroups.flatMap((group) => group.items);
