import { shellApi } from "../../api/api";
import { registerPDFVisorMainView, registerPdfViewerNavItem } from "../../api/pdf-viewer-manager/handle-views";
import { registerAdministrativeNavMenuViews } from "./administrative-nav-menu";
import { registerDoctorNavMenuViews } from "./doctor-nav-menu";
import { registerDoctorQuickActionViews } from "./doctor-quick-action-menu";

const registerMainViews = () => {
  registerPDFVisorMainView();
};

const registerPdfViewerNavButton = () => {
  registerPdfViewerNavItem();
};

export const useInternalViews = () => {
  registerMainViews();
  registerPdfViewerNavButton();
  const isUserRoleAdministrative = shellApi.userManager.isUserRoleAdministrative();
  if (isUserRoleAdministrative) registerAdministrativeNavMenuViews();
  else {
    registerDoctorNavMenuViews();
    registerDoctorQuickActionViews();
  }
};
