// import { useState } from "react";
import React from "react";
import {
  FaChartLine,
  FaFileAlt,
  FaBook,
  FaUsers,
  FaBullhorn,
  FaUser,
  FaCog,
  FaQuestion,
} from "react-icons/fa";
// import { HiOutlineBookOpen } from "react-icons/hi";
// import { BsChatSquareText } from "react-icons/bs";
// import { MdOutlineBook } from "react-icons/md";
import UserImage from "../assets/images/dashboardImage.png";
import Learning from "../assets/svg/learning";
import { AwardIcon, AwardIconActive } from "../assets/svg/award";
import { DocumentIcon, DocumentIconActive } from "../assets/svg/document";
import {
  AnalysisIcon,
  AnalysisIconActive,
  TeamsIcon,
  TeamsIconActive,
} from "../assets/svg/teams";
// import { VolumeIcon } from "../assets/svg/volume";
import { CoursesIcon, CoursesIconActive } from "../assets/svg/book";
import { DashboardIcon, DashboardIconActive } from "../assets/svg/dashboard";
import CommunityIcon from "../components/sideNav/svg/commIcon";
import FunIcon from "../components/sideNav/svg/fun";
import DuetIcon from "../components/sideNav/svg/duetIcon";
import SpeechIcon from "../components/sideNav/svg/speechIcon";
import DictionaryIcon from "../components/sideNav/svg/dictionaryIcon";
// import { MessageIcon } from "../assets/svg/message";
import { MessagesIcon, MessagesIconActive } from "../assets/svg/messagesIcon";
import {
  AnnouncementsIcon,
  AnnouncementsIconActive,
} from "../assets/svg/announcementsIcon";
import {
  FileManagerIcon,
  FileManagerIconActive,
} from "../assets/svg/fileManagerIcon";
import { LibraryIcon, LibraryIconActive } from "../assets/svg/libraryIcon";
import { AddOnIcon, AddOnIconActive } from "../assets/svg/addOnIcon";
import {
  ManageStudentsIcon,
  ManageStudentsIconActive,
} from "../assets/svg/students";
import { ApiIcon, ApiIconActive } from "../assets/svg/apiIcon";
import CompuetrerIcon from "../components/header/assets/svg/computerIcon";

export const user = {
  name: "John Doe",
  handle: "@johndoe",
  avatar: UserImage,
};

export const leftNavMenu = [
  {
    path: "https://www.learngual.com/developer",
    label: "Learning",
    icon: <Learning />,
  },
  {
    path: "https://comingsoon.learngual.com/community",
    label: "Community",
    icon: <CommunityIcon />,
  },
  {
    path: "https://comingsoon.learngual.com/fun",
    label: "Fun",
    icon: <FunIcon />,
  },
  {
    path: "https://comingsoon.learngual.com/explore",
    label: "Explore",
    icon: <DuetIcon />,
  },
  {
    path: "https://comingsoon.learngual.com/connect",
    label: "Connect",
    icon: <SpeechIcon />,
  },
  {
    path: "https://comingsoon.learngual.com/dictionary",
    label: "Dictionary",
    icon: <DictionaryIcon />,
  },
  {
    path: window.location.hostname.includes("ca")
      ? "https://demo.learngual.ca/type-select"
      : "https://demo.learngual.com/type-select",
    label: "Demo",
    icon: <CompuetrerIcon />,
  },
];

export const getLeftRoutes = (accoutType) => {
  const leftNavMenu = [
    {
      path: `${
        window.location.hostname.includes("localhost") ||
        window.location.hostname.includes("staging")
          ? `https://559staging.learngual.${
              window.location.hostname.includes(".ca") ? "ca" : "com"
            }/${accoutType}`
          : `https://www.learngual.${
              window.location.hostname.includes(".ca") ? "ca" : "com"
            }/${accoutType}`
      }`,
      label: "Learning",
      icon: <Learning />,
    },
    {
      path: "https://comingsoon.learngual.com/community",
      label: "Community",
      icon: <CommunityIcon />,
    },
    {
      path: "https://comingsoon.learngual.com/fun",
      label: "Fun",
      icon: <FunIcon />,
    },
    {
      path: "https://comingsoon.learngual.com/explore",
      label: "Explore",
      icon: <DuetIcon />,
    },
    {
      path: "https://comingsoon.learngual.com/connect",
      label: "Connect",
      icon: <SpeechIcon />,
    },
    {
      path: "https://comingsoon.learngual.com/dictionary",
      label: "Dictionary",
      icon: <DictionaryIcon />,
    },
    {
      path: `${
        window.location.hostname.includes("staging")
          ? `https://demo-test-01.learngual${
              window.location.hostname.includes("ca")
                ? ".ca/type-select"
                : ".com/type-select"
            }`
          : `https://demo.learngual${
              window.location.hostname.includes("ca")
                ? ".ca/type-select"
                : ".com/type-select"
            }`
      }`,
      label: "Demo",
      icon: <CompuetrerIcon />,
    },
  ];
  return leftNavMenu;
};

export const sideMenuOptions = [
  {
    userType: "developer",
    routes: [
      {
        path: "/developer",
        icon: <ApiIcon />,
        iconActive: <ApiIconActive />,
        text: "API",
        // notifications: 2,
      },
      {
        path: "https://developer.learngual.com",
        icon: <DocumentIcon />,
        iconActive: <DocumentIconActive />,
        text: "Documentation",
        newTab: true,
        // notifications: 5,
      },
      {
        path: "/developer/report",
        icon: <AwardIcon />,
        iconActive: <AwardIconActive />,
        text: "Reports",
      },
    ],
  },
  {
    userType: "enterprise",
    routes: [
      {
        path: "/enterprise/dashboard",
        icon: <DashboardIcon />,
        iconActive: <DashboardIconActive />,
        text: "Dashboard",
        notifications: null,
      },
      {
        path: "/enterprise/reports",
        icon: <AwardIcon />,
        iconActive: <AwardIconActive />,
        text: "Reports",
      },
      {
        path: "/enterprise/courses",
        icon: <CoursesIcon />,
        iconActive: <CoursesIconActive />,
        text: "Courses",
      },
      {
        path: "/enterprise/manage-teams",
        icon: <TeamsIcon />,
        iconActive: <TeamsIconActive />,
        text: "Manage teams",
      },
      {
        path: "/enterprise/analytics",
        icon: <AnalysisIcon />,
        iconActive: <AnalysisIconActive />,
        text: "Analytics",
      },
      {
        path: "/msg/enterprise/messages",
        icon: <MessagesIcon />,
        iconActive: <MessagesIconActive />,
        text: "Messages",
        notifications: true,
      },
      {
        path: "/enterprise/announcements",
        icon: <AnnouncementsIcon />,
        iconActive: <AnnouncementsIconActive />,
        text: "Announcements",
      },
      {
        path: "/enterprise/file-manager",
        icon: <FileManagerIcon />,
        iconActive: <FileManagerIconActive />,
        text: "File manager",
      },
    ],
  },
  {
    userType: "instructor",
    routes: [
      {
        path: "/instructor/dashboard",
        icon: <DashboardIcon />,
        iconActive: <DashboardIconActive />,
        text: "Dashboard",
      },
      {
        path: "/instructor/reports",
        icon: <AwardIcon />,
        iconActive: <AwardIconActive />,
        text: "Manage report",
        // disabled: true,
      },
      {
        path: "/instructor/courses",
        icon: <CoursesIcon />,
        iconActive: <CoursesIconActive />,
        text: "Manage courses",
      },
      // {
      //   path: "/instructor/manage-students",
      //   icon: <ManageStudentsIcon />,
      //   iconActive: <ManageStudentsIconActive />,
      //   text: "Manage student",
      // },
      {
        path: "/instructor/analytics",
        icon: <AnalysisIcon />,
        iconActive: <AnalysisIconActive />,
        text: "Analytics",
      },
      {
        path: "/msg/instructor/messages",
        icon: <MessagesIcon />,
        iconActive: <MessagesIconActive />,
        text: "Messages",
        notifications: true,
      },
      {
        path: "/instructor/announcements",
        icon: <AnnouncementsIcon />,
        iconActive: <AnnouncementsIconActive />,
        text: "Announcements",
      },
      {
        path: "/instructor/contracts",
        icon: <DocumentIcon />,
        iconActive: <DocumentIconActive />,
        text: "Contracts",
        affiliates: true,
      },
      {
        path: "/instructor/file-manager",
        icon: <FileManagerIcon />,
        iconActive: <FileManagerIconActive />,
        text: "File manager",
      },
    ],
  },
  {
    userType: "personal",
    routes: [
      // {
      //   path: "/personal/dashboard",
      //   icon: <DashboardIcon />,
      //   iconActive: <DashboardIconActive />,
      //   text: "Dashboard",
      //   disabled: true,
      // },
      // {
      //   path: "/personal/library",
      //   icon: <LibraryIcon />,
      //   iconActive: <LibraryIconActive />,
      //   text: "Library",
      //   disabled: true,
      // },
      {
        path: "/personal/courses",
        icon: <CoursesIcon />,
        iconActive: <CoursesIconActive />,
        text: "My courses",
      },
      {
        path: "/personal/reports",
        icon: <AwardIcon />,
        iconActive: <AwardIconActive />,
        text: "Reports",
      },
      {
        path: "/msg/personal/messages",
        icon: <MessagesIcon />,
        iconActive: <MessagesIconActive />,
        text: "Messages",
        notifications: true,
      },
      // {
      //   path: "/personal/addons",
      //   icon: <AddOnIcon />,
      //   iconActive: <AddOnIconActive />,
      //   text: "Add on",
      //   disabled: true,
      // },
    ],
  },
  {
    userType: "user",
    routes: [
      {
        path: "/dashboard",
        icon: <DashboardIcon />,
        text: "Dashboard",
        notifications: 1,
      },
      { path: "/courses", icon: <FaBook />, text: "Courses" },
      { path: "/teams", icon: <FaUsers />, text: "My teams" },
      { path: "/profile", icon: <FaUser />, text: "Profile" },
      { path: "/help", icon: <FaQuestion />, text: "Help" },
    ],
  },
];

const routes = [
  {
    userType: "admin",
    routes: [
      {
        path: "/dashboard",
        icon: <FaChartLine />,
        text: "Dashboard",
        notifications: 2,
      },
      {
        path: "/reports",
        icon: <FaFileAlt />,
        text: "Reports",
        notifications: 5,
      },
      { path: "/courses", icon: <FaBook />, text: "Courses" },
      { path: "/teams", icon: <FaUsers />, text: "Manage teams" },
      { path: "/announcements", icon: <FaBullhorn />, text: "Announcements" },
      { path: "/settings", icon: <FaCog />, text: "Settings" },
    ],
  },
  {
    userType: "user",
    routes: [
      {
        path: "/dashboard",
        icon: <FaChartLine />,
        text: "Dashboard",
        notifications: 1,
      },
      { path: "/courses", icon: <FaBook />, text: "Courses" },
      { path: "/teams", icon: <FaUsers />, text: "My teams" },
      { path: "/profile", icon: <FaUser />, text: "Profile" },
      { path: "/help", icon: <FaQuestion />, text: "Help" },
    ],
  },
];
