import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import App from '../App.vue'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    name: 'App',
    component: App,
    children: [
      {
        path: '/Home',
        name: 'Home',
        component: () => import('@/view/Home/index.vue')
      },
      {
        path: '/Mine',
        name: 'Mine',
        component: () => import('@/view/Mine/index.vue')
      }
    ]
  },
  {
    path: '/Nft/create',
    name: 'createNft',
    component: () => import('@/view/NFT/Create.vue')
  },
  {
    path: '/auth',
    component: () => import("@/view/Auth/index.vue"),
    children: [
      {
        path: '/auth/Login',
        name: 'Login',
        component: () => import("@/view/Auth/Login/index.vue")
      },
      {
        path: '/auth/PwdSetting',
        name: 'PwdSetting',
        component: () => import("@/view/Auth/PwdSetting/index.vue")
      },
      {
        path: '/auth/PwdFind',
        name: 'PwdFind',
        component: () => import("@/view/Auth/PwdFind/index.vue")
      },
      {
        path: '/auth/PwdModify',
        name: 'PwdModify',
        component: () => import("@/view/Auth/PwdModify/index.vue")
      },
    ]
  }

]



const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
