import RoutePath from './routePath';

/* 
  文档
  https://umijs.org/zh-CN/plugins/plugin-layout
*/
export default [
  {
    path: '/login',
    layout: false,
    component: './Login',
  },
  {
    name: '充值系统',
    path: RoutePath.RECHARGE,
    access: 'normalRouteFilter',
    routes: [
      {
        path: RoutePath.RECHARGE,
        redirect: RoutePath.RECORD.LIST,
        hideInMenu: true,
      },
      {
        name: '充值订单',
        path: RoutePath.RECORD.LIST,
        access: 'normalRouteFilter',
        component: './Recharge/Record/List',
      },
      {
        name: '收款地址',
        path: RoutePath.WALLET.LIST,
        access: 'normalRouteFilter',
        component: './Recharge/Wallet/List',
      },
      {
        name: '代币种类',
        path: RoutePath.COIN_TYPE.LIST,
        access: 'normalRouteFilter',
        component: './Recharge/CoinType/List',
      },
      {
        name: '提现管理',
        path: RoutePath.WITHDRAW.LIST,
        access: 'normalRouteFilter',
        component: './Recharge/Withdraw/List',
      },
    ],
  },
  {
    name: '用户账号',
    path: RoutePath.USER,
    access: 'normalRouteFilter',
    routes: [
      {
        path: RoutePath.USER,
        redirect: RoutePath.USER_LIST.LIST,
        hideInMenu: true,
      },
      {
        name: '用户账号管理',
        path: RoutePath.USER_LIST.LIST,
        access: 'normalRouteFilter',
        component: './User/List',
      },
    ],
  },
  {
    name: '系统设置',
    path: RoutePath.SYSTEM,
    access: 'normalRouteFilter',
    routes: [
      {
        path: RoutePath.SYSTEM,
        redirect: RoutePath.ACCOUNT.LIST,
        hideInMenu: true,
      },
      {
        name: '账号管理',
        path: RoutePath.ACCOUNT.LIST,
        access: 'normalRouteFilter',
        component: './System/Account/List',
      },
      {
        name: '角色管理',
        path: RoutePath.ROLE.LIST,
        access: 'normalRouteFilter',
        component: './System/Role/List',
      },
      {
        name: '权限管理',
        path: RoutePath.PERMISSIONS.LIST,
        access: 'normalRouteFilter',
        component: './System/Permissions/List',
      },
      {
        name: '通知管理',
        path: RoutePath.NOTICE.LIST,
        access: 'normalRouteFilter',
        component: './System/Notice/List',
      },
      {
        name: '密钥管理',
        path: RoutePath.SECRET_KEY,
        access: 'normalRouteFilter',
        component: './System/SecretKey',
      },
    ],
  },
  {
    name: '数据看板',
    access: 'normalRouteFilter',
    path: RoutePath.DATABOARD,
    routes: [
      {
        path: RoutePath.DATABOARD,
        redirect: RoutePath.COREDATA.LIST,
        hideInMenu: true,
      },
      {
        name: '核心看板',
        path: RoutePath.COREDATA.LIST,
        access: 'normalRouteFilter',
        component: './DataBoard/CoreData/List',
      },
      {
        name: '活跃分析',
        path: RoutePath.ACTIVEANALYSIS.LIST,
        access: 'normalRouteFilter',
        component: './DataBoard/ActiveAnalysis/List',
      },
      {
        name: '留存分析',
        path: RoutePath.RETENTIONANALYSIS.LIST,
        access: 'normalRouteFilter',
        component: './DataBoard/RetentionAnalysis/List',
      },
      {
        name: '用户充值分析',
        path: RoutePath.RECHARGEANALYSIS.LIST,
        access: 'normalRouteFilter',
        component: './DataBoard/RechargeAnalysis/List',
      },
    ],
  },
  {
    name: 'NFT',
    path: RoutePath.NFT,
    access: 'normalRouteFilter',
    routes: [
      {
        path: RoutePath.NFT,
        redirect: RoutePath.NFTCONTRACT.LIST,
        hideInMenu: true,
      },
      {
        name: 'NFT合约管理',
        path: RoutePath.NFTCONTRACT.LIST,
        access: 'normalRouteFilter',
        component: './NFT/NftContract/List',
      },
      {
        name: 'NFT管理',
        path: RoutePath.NFTTOKEN.LIST,
        access: 'normalRouteFilter',
        component: './NFT/NftToken/List',
      },
      {
        name: 'NFT交易',
        path: RoutePath.NFTTRADE.LIST,
        access: 'normalRouteFilter',
        component: './NFT/NftTrade/List',
      },
    ],
  },
  {
    path: '/',
    redirect: RoutePath.RECORD.LIST,
  },
  {
    component: './404',
  },
];
