import { getTranslationID } from "translation";
import { HeaderMenus, LoginedPaths } from "./types";

export const HEADER_MENUS_ACCOUNT = "Account";
export const HEADER_MENUS_USER = "User";
export const HEADER_MENUS_LICENSE = "License";
export const HEADER_MENUS_DICTATIONS = "Dictations";
export const HEADER_MENUS_WORKFLOW = "Workflow";
export const HEADER_MENUS_PARTNER = "Partners";
export const HEADER_MENUS_SUPPORT = "Support";

export const HEADER_MENUS: {
  key: HeaderMenus;
  label: string;
  path: LoginedPaths;
}[] = [
  {
    key: HEADER_MENUS_ACCOUNT,
    label: getTranslationID("common.label.headerAccount"),
    path: "/account",
  },
  {
    key: HEADER_MENUS_DICTATIONS,
    label: getTranslationID("common.label.headerDictations"),
    path: "/dictations",
  },
  {
    key: HEADER_MENUS_LICENSE,
    label: getTranslationID("common.label.headerLicense"),
    path: "/license",
  },
  {
    key: HEADER_MENUS_USER,
    label: getTranslationID("common.label.headerUser"),
    path: "/user",
  },
  {
    key: HEADER_MENUS_WORKFLOW,
    label: getTranslationID("common.label.headerWorkflow"),
    path: "/workflow",
  },
  {
    key: HEADER_MENUS_PARTNER,
    label: getTranslationID("common.label.headerPartners"),
    path: "/partners",
  },
  {
    key: HEADER_MENUS_SUPPORT,
    label: getTranslationID("common.label.headerSupport"),
    path: "/support",
  },
];

export const HEADER_NAME = "ODMS Cloud";

/**
 * adminのみに表示するヘッダータブ
 */
export const ADMIN_ONLY_TABS = [
  HEADER_MENUS_ACCOUNT,
  HEADER_MENUS_LICENSE,
  HEADER_MENUS_USER,
  HEADER_MENUS_WORKFLOW,
  HEADER_MENUS_PARTNER,
  HEADER_MENUS_WORKFLOW,
];

/**
 * 第1~4階層のみに表示するヘッダータブ
 */
export const TIER1_TO_TIER4_ONLY_TABS = [HEADER_MENUS_PARTNER];

/**
 * admin,standardでなく、第1～5階層でもないアカウントに表示する空のヘッダータブ
 */
export const INVALID_ACCOUNT_TABS = [];

/**
 * 代行操作中に表示するヘッダータブ
 */
export const DELEGATE_TABS = [
  HEADER_MENUS_LICENSE,
  HEADER_MENUS_USER,
  HEADER_MENUS_WORKFLOW,
];
