import { RouteRecordRaw } from "vue-router";
import { Layout } from "@/router/constant";
import { renderIcon } from "@/utils";
// import { icons } from "@/plugins";
import { OptionsSharp } from "@vicons/ionicons5";

// 引入路径
const importPath = {
  MENU: () => import("@/views/system/menu/menu.vue"),
};

const systemRoutes: RouteRecordRaw = {
  path: "/system",
  name: "System",
  redirect: "/system/menu",
  component: Layout,
  meta: {
    title: "系统设置",
    icons: renderIcon(OptionsSharp),
    sort: 1,
  },
  children: [
    {
      path: "menu",
      name: "system_menu",
      meta: {
        title: "菜单权限管理",
      },
      component: importPath["MENU"],
    },
    {
      path: "role",
      name: "system_role",
      meta: {
        title: "角色权限管理",
      },
      component: () => import("@/views/system/role/role.vue"),
    },
  ],
};

export default systemRoutes;
