import Layout from '@/layout/index.vue'

/**
 * 商户中心路由
 */
export const mchRoutes = [
  {
    path: '/business',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '经营管理',
      icon: 'store'
    },
    children: [
      {
        path: 'store',
        component: () => import('../views/mch/store'),
        hidden: false,
        name: "MyStore",
        meta: {
          noCache: false,
          title: '我的店铺',
          icon: 'store'
        }
      },
      {
        path: 'storeStaff',
        component: () => import('../views/mch/storeStaff'),
        hidden: false,
        name: "MyStoreStaff",
        meta: {
          noCache: false,
          title: '店铺员工',
          icon: 'agent'
        }
      },
      {
        path: 'store/:storeId',
        component: () => import('../views/mch/store/detail.vue'),
        hidden: true,
        name: "MyStoreDetail",
        meta: {
          noCache: false,
          title: '店铺详情',
        }
      },
      {
        path: 'suit',
        component: () => import('@/views/mch/suit/index.vue'),
        hidden: false,
        name: "MchSuit",
        meta: {
          noCache: false,
          title: '套餐管理',
          icon: 'suit',
        }
      },
    ]
  },
  {
    path: '/sale',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '营销活动管理',
      icon: 'shopping',
    },
    children: [
      {
        path: 'vipLevel',
        component: () => import('@/views/mch/vipLevel'),
        hidden: false,
        name: "MchVipLevel",
        meta: {
          noCache: false,
          title: '会员等级',
          icon: 'chart',
        }
      },
      {
        path: 'vip',
        component: () => import('@/views/mch/vip'),
        hidden: false,
        name: "MchVip",
        meta: {
          noCache: false,
          title: '会员列表',
          icon: 'vip',
        }
      },
    ]
  },
  {
    path: '/device',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '设备管理',
      icon: 'monitor',
    },
    children: [
      {
        path: '',
        component: () => import('@/views/mch/device'),
        hidden: false,
        name: "MyDevice",
        meta: {
          noCache: false,
          title: '我的设备',
          icon: 'monitor',
        }
      },
      {
        path: ':deviceId',
        component: () => import('@/views/mch/device/detail.vue'),
        hidden: true,
        name: "MyDeviceDetail",
        meta: {
          noCache: false,
          title: '设备详情',
        }
      },
    ]
  },
  {
    path: '/bill',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '订单管理',
      icon: 'shopping'
    },
    children: [
      {
        path: 'recharge',
        component: () => import('../views/mch/recharge'),
        hidden: false,
        name: "MchRecharge",
        meta: {
          noCache: false,
          title: '订单列表',
          icon: 'shopping'
        }
      },
      // {
      //   path: 'refund',
      //   component: () => import('@/views/mch/refund'),
      //   hidden: false,
      //   name: "MchRefund",
      //   meta: {
      //     noCache: false,
      //     title: '订单退款',
      //     icon: 'refund'
      //   }
      // },
      {
        path: 'recharge/:billId',
        component: () => import('@/views/mch/recharge/detail.vue'),
        hidden: true,
        name: "MchRechargeDetail",
        meta: {
          noCache: false,
          title: '订单详情',
        }
      },
    ]
  },
  {
    path: '/money',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '财务管理',
      icon: 'money'
    },
    children: [
      {
        path: 'withdraw',
        component: () => import('@/views/mch/withdraw/index.vue'),
        hidden: false,
        name: "MchWithdraw",
        meta: {
          noCache: false,
          title: '提现记录',
          icon: 'withdraw'
        }
      },
      {
        path: 'recordBalance',
        component: () => import('@/views/mch/recordBalance/index.vue'),
        hidden: false,
        name: "MchRecordBalance",
        meta: {
          noCache: false,
          title: '余额明细',
          icon: 'money',
        }
      },
      {
        path: 'receiveBill',
        component: () => import('@/views/mch/receiveBill/index.vue'),
        hidden: false,
        name: "MchReceiveBill",
        meta: {
          noCache: false,
          title: '应付账单',
          icon: 'withdraw'
        }
      },
    ]
  },
  {
    path: '/dev',
    component: Layout,
    hidden: false,
    alwaysShow: true,
    meta: {
      title: '开发管理',
      icon: 'code'
    },
    children: [
      {
        path: 'access',
        hidden: false,
        component: () => import('@/views/mch/access/index.vue'),
        name: "MchAccess",
        meta: {
          noCache: false,
          title: '秘钥管理',
          icon: 'key',
        },
      },
      {
        path: 'doc',
        component: () => import('@/views/mch/devDoc/index.vue'),
        hidden: false,
        name: 'DevDoc',
        meta: {
          noCache: false,
          title: '开发文档',
          icon: 'documentation'
        },
      }
    ]
  },
]
