import { createRouter, createWebHistory } from "vue-router"
import TabGroup from './../pages/tab-group';

// 2. 定义路由配置
const routes = [
    {
        path: '/red-pack',
        name: 'redPack',
        component: () => import('@/pages/red-packet')
    },
    {
        path: '/tab-group',
        name: 'tabGroup',
        component: TabGroup
    },
    {
        path: '/nav-message',
        name: 'navMessage',
        component: () => require('@/pages/tabbar/message/index')
    },
    {
        path: '/nav-nft-index',
        name: 'navNftIndex',
        component: () => require('@/pages/tabbar/nft/index')
    },
    {
        path: '/nav-nft-detail',
        name: 'navNftDetail',
        component: () => require('@/pages/tabbar/nft/detail')
    },
    {
        path: '/nav-nft-transfer',
        name: 'navNftTransfer',
        component: () => require('@/pages/tabbar/nft/transfer')
    },
    {
        path: '/nav-wallet-index',
        name: 'navWalletIndex',
        component: () => require('@/pages/tabbar/wallet/index')
    },
    {
        path: '/nav-wallet-transactions',
        name: 'navWalletTransactions',
        component: () => require('@/pages/tabbar/wallet/transactions')
    },
    {
        path: '/page-currency-detail',
        name: 'pageCurrencyDetail',
        component: () => require('@/pages/currency/detail')
    }
]


// 3. 创建路由实例
const router = createRouter({

    // 4. 采用hash 模式
    // history: createWebHashHistory('popup.html'),
    // 采用 history 模式
    history: createWebHistory(),
    routes, // short for `routes: routes`
});
export default router

