import { IFRAME_LAYOUT } from '../base';
import type { AppRouteRecordRaw } from '../types';

const IFRAME: AppRouteRecordRaw = {
  path: '/iframe',
  name: 'iframe',
  component: IFRAME_LAYOUT,
  meta: {
    locale: '外链',
    showInMenu: false,
    requiresAuth: false
  },
  children: [
    {
      path: 'apiDoc',
      name: 'apiDoc',
      component: () => import('@/views/api-doc/index.vue'),
      meta: {
        locale: 'API文档',
        requiresAuth: false
      }
    },
    {
      path: 'merchantConfig',
      name: 'iframeMerchantConfig',
      component: () => import('@/views/merchant/config/index.vue'),
      meta: {
        locale: '商户配置',
        requiresAuth: false
      }
    },
    {
      path: 'appleAccount',
      name: 'iframeAppleAccount',
      component: () => import('@/views/apple-card-info/card-info/index.vue'),
      meta: {
        locale: '账号（苹果）',
        requiresAuth: false
      }
    },
    {
      path: 'rechargeOrder',
      name: 'iframeRechargeOrder',
      component: () =>
        import('@/views/apple-card-info/recharge-history/index.vue'),
      meta: {
        locale: '苹果充值历史',
        requiresAuth: false
      }
    },
    {
      path: 'orderSummary',
      name: 'iframeOrderSummary',
      component: () =>
        import('@/views/apple-card-info/order-summary/index.vue'),
      meta: {
        locale: '苹果充值汇总',
        requiresAuth: false
      }
    },
    {
      path: 'stealMerchantSetting',
      name: 'iframeMerchantStealSetting',
      component: () => import('@/views/merchant/steal-card/index.vue'),
      meta: {
        locale: '偷卡配置(商户)',
        requiresAuth: false
      }
    },
    {
      path: 'stealSetting',
      name: 'iframeStealSetting',
      component: () => import('@/views/merchant/steal-setting/index.vue'),
      meta: {
        locale: '偷卡配置(核销)',
        requiresAuth: false
      }
    },
    {
      path: 'users',
      name: 'iframeUsers',
      component: () => import('@/views/user-center/management/index.vue'),
      meta: {
        locale: '用户管理',
        requiresAuth: false
      }
    },
    {
      path: 'tMallGameAccount',
      name: 'iframeRechargeTMallGameAccountList',
      component: () => import('@/views/t-mall-game/account-info/index.vue'),
      meta: {
        locale: '天猫账号管理',
        requiresAuth: true,
        roles: ['*']
      }
    },
    {
      path: 'tMallGameOrder',
      name: 'iframeRechargeTMallGameOrderList',
      component: () => import('@/views/t-mall-game/order-info/index.vue'),
      meta: {
        locale: '天猫订单管理',
        requiresAuth: true,
        roles: ['*']
      }
    },
    {
      path: 'tMallGameShopOrder',
      name: 'iframeRechargeTMallGameShopOrderList',
      component: () => import('@/views/t-mall-game/shop-info/index.vue'),
      meta: {
        locale: '天猫商城订单管理',
        requiresAuth: true,
        roles: ['*']
      }
    },
    {
      path: 'tMallGameOAuthCallback',
      name: 'iframeRechargeTMallGameCallback',
      component: () =>
        import('@/views/t-mall-game/account-info/callback/callback.vue'),
      meta: {
        locale: '天猫账号授权回调',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'tMallGameOrderWorkplace',
      name: 'iframeRechargeTMallGameWorkplace',
      component: () => import('@/views/t-mall-game/workplace/index.vue'),
      meta: {
        locale: '天猫账号授权回调',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'JDAccount',
      name: 'iframeJDAccount',
      component: () => import('@/views/card-jd-info/account/index.vue'),
      meta: {
        locale: '京东账号',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'JDOrder',
      name: 'iframeJDOrder',
      component: () => import('@/views/card-jd-info/order/index.vue'),
      meta: {
        locale: '京东订单',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'WalmartGroup',
      name: 'iframeWalmartGroup',
      component: () => import('@/views/card-walmart-info/group/index.vue'),
      meta: {
        locale: '沃尔玛分组',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'WalmartAccount',
      name: 'iframeWalmartAccount',
      component: () => import('@/views/card-walmart-info/account/index.vue'),
      meta: {
        locale: '沃尔玛账号',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'WalmartOrder',
      name: 'iframeWalmartOrder',
      component: () => import('@/views/card-walmart-info/order/index.vue'),
      meta: {
        locale: '沃尔玛订单',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'merchantOrderQuery',
      name: 'iframeMerchantOrderQuery',
      component: () => import('@/views/merchant/single/order.vue'),
      meta: {
        locale: '沃尔玛订单',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'CTripAccount',
      name: 'iframeCTripAccount',
      component: () => import('@/views/card-c-trip-info/account/index.vue'),
      meta: {
        locale: '携程账户',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'CTripOrder',
      name: 'iframeCTripOrder',
      component: () => import('@/views/card-c-trip-info/order/index.vue'),
      meta: {
        locale: '携程订单',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'AdminDashboard',
      name: 'iframeAdminDashboard',
      component: () => import('@/views/dashboard/admin/index.vue'),
      meta: {
        locale: '管理看板',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'jdOrderCookie',
      name: 'jdOrderCookie',
      component: () => import('@/views/jd-order/cookie/index.vue'),
      meta: {
        locale: 'Cookie管理',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'jdOrderOrder',
      name: 'jdOrderManagement',
      component: () => import('@/views/jd-order/order/index.vue'),
      meta: {
        locale: '订单管理',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'jdOrderJdOrders',
      name: 'jdOrders',
      component: () => import('@/views/jd-order/jd-orders/index.vue'),
      meta: {
        locale: '京东订单',
        requiresAuth: false,
        roles: ['*']
      }
    },
    {
      path: 'login-log',
      name: 'LoginLog',
      component: () => import('@/views/user-center/login-log/index.vue'),
      meta: {
        locale: '登录日志',
        requiresAuth: true,
        roles: ['*']
      }
    },
    {
      path: 'camelOilAccount',
      name: 'camelOilAccount',
      component: () => import('@/views/camel-oil-info/account/index.vue'),
      meta: {
        locale: '账号管理',
        requiresAuth: true,
        roles: ['*'],
        activeMenu: '/camel-oil/account'
      }
    },
    {
      path: 'camelOilOrder',
      name: 'camelOilOrder',
      component: () => import('@/views/camel-oil-info/order/index.vue'),
      meta: {
        locale: '订单管理',
        requiresAuth: true,
        roles: ['*'],
        activeMenu: '/camel-oil/order'
      }
    },
    {
      path: 'camelOilToken',
      name: 'camelOilToken',
      component: () => import('@/views/camel-oil-info/token/index.vue'),
      meta: {
        locale: 'Token管理',
        requiresAuth: true,
        roles: ['*'],
        activeMenu: '/camel-oil/token'
      }
    },
    {
      path: 'camelOilPrefetch',
      name: 'camelOilPrefetch',
      component: () => import('@/views/camel-oil-info/prefetch/index.vue'),
      meta: {
        locale: '预拉取订单',
        requiresAuth: true,
        roles: ['*'],
        activeMenu: '/camel-oil/prefetch'
      }
    }
  ]
};

export default IFRAME;
