import { AnnotatorList } from "@/modules/Annotator/List";
import { DicomList } from "@/modules/Admin/Dicom/List";
import { DicomUpload } from "@/modules/Admin/Dicom/Upload";
import { Navigate, RouteObject } from "react-router-dom";
import { ExpandRouteProps } from ".";
import { ROLE_NAME } from "@/constant";
import { AdminDashboard } from "@/modules/Admin";
import { AnnotatorDashBoard } from "@/modules/Annotator";

export const roleRoutes: Record<ROLE_NAME, (RouteObject & ExpandRouteProps)[]> =
  {
    /**
     * 管理员
     */
    [ROLE_NAME.ADMIN]: [
      {
        path: "/",
        element: <AdminDashboard />,
        children: [
          {
            path: "/",
            element: <Navigate to="/list" replace />,
          },
          {
            path: "/list",
            element: <DicomList />,
          },
          {
            path: "/upload",
            element: <DicomUpload />,
          },
        ],
      },
      // {
      //   path: "/list",
      //   element: <DicomList />,
      //   title: "管理员",
      // },
      // {
      //   path: "/upload",
      //   element: <DicomUpload />,
      //   title: "管理员",
      // },
    ],
    /**
     * 标注
     */
    [ROLE_NAME.ANNOTATOR]: [
      {
        path: "/",
        element: <AnnotatorDashBoard />,
        title: "标注",
        children: [
          {
            path: "/",
            element: <Navigate to="/list" replace />,
          },
          {
            path: "/list",
            element: <AnnotatorList />,
          },
        ],
      },
    ],
  };
