import {
  Dashboard as DashboardIcon,
  NotificationsNone as NotificationsIcon,
  FormatSize as TypographyIcon,
  FilterNone as UIElementsIcon,
  BorderAll as TableIcon,
  QuestionAnswer as SupportIcon,
  LibraryBooks as LibraryIcon,
  HelpOutline as FAQIcon,
  Image as ImageIcon,
  Build as BuildIcon,
  Settings as SettingsIcon,
  NetworkCheck as NetworkCheckIcon,
  Vibration as VibrationIcon
} from "@material-ui/icons";
import Dot from "./components/Dot";

let menu = [
  {
    id: 0,
    label: "Menu.Dashboard",
    link: "/dashboard",
    icon: <DashboardIcon />
  },
  {
    id: 1,
    label: "Menu.Resources",
    link: "/resources",
    icon: <ImageIcon />
  },

  { id: 2, type: "divider" },
  { id: 3, type: "title", label: "Menu.System" },
  {
    id: 4,
    label: "Menu.Admin",
    link: "/admin",
    icon: <BuildIcon />
  },
  {
    id: 5,
    label: "Menu.Settings",
    link: "/settings",
    icon: <SettingsIcon />,
    children: [
      {
        id: 50,
        label: "Menu.Appearance",
        link: "/appearance",
        icon: <VibrationIcon />
      },
      {
        id: 51,
        label: "Menu.Notifications",
        link: "/notifications",
        icon: <NotificationsIcon />
      }
    ]
  },
  {
    id: 6,
    label: "Menu.Health",
    link: "/health",
    icon: <NetworkCheckIcon />
  },
  { id: 7, type: "divider" },
  { id: 8, type: "title", label: "Menu.Community" },
  {
    id: 9,
    label: "Menu.Library",
    link: "https://lab.code-rove.com/gitea/tudor/cdn-frontend",
    icon: <LibraryIcon />
  },
  {
    id: 10,
    label: "Menu.Support",
    link: "https://lab.code-rove.com/tsp",
    icon: <SupportIcon />
  },
  {
    id: 11,
    label: "Menu.FAQ",
    link: "https://lab.code-rove.com/tsp",
    icon: <FAQIcon />
  }
];

const enableTemplateContent =
  process.env.REACT_APP_ENABLE_TEMPLATE_CONTENT === "True";

if (enableTemplateContent) {
  menu.push(
    { id: 12, type: "divider" },
    {
      id: 13,
      label: "Menu.Template",
      children: [
        {
          id: 14,
          label: "Typography",
          link: "/typography",
          icon: <TypographyIcon />
        },
        { id: 15, label: "Tables", link: "/tables", icon: <TableIcon /> },
        {
          id: 16,
          label: "UI Elements",
          link: "/ui",
          icon: <UIElementsIcon />,
          children: [
            { label: "Icons", link: "/ui/icons" },
            { label: "Charts", link: "/ui/charts" },
            { label: "Maps", link: "/ui/maps" }
          ]
        },
        {
          id: 17,
          label: "My recent",
          link: "",
          icon: <Dot size="small" color="warning" />
        },
        {
          id: 18,
          label: "Starred",
          link: "",
          icon: <Dot size="small" color="primary" />
        },
        {
          id: 19,
          label: "Background",
          link: "",
          icon: <Dot size="small" color="secondary" />
        }
      ]
    }
  );
}

export default menu;
