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";

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