/* eslint-disable */
import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"
import Tabcontent from '@/view/popup/tabbar-page/index.vue'
import Home from '@/view/popup/tabbar-page/wallter/popup.vue'
import NFT  from '@/view/popup/tabbar-page/nft/index.vue'
import Message from '@/view/popup/tabbar-page/message/index.vue'
import More from '@/view/popup/tabbar-page/more/index.vue'

import NFTDetail  from '@/view/popup/tabbar-page/nft/detail.vue'

import Withdraw from '@/view/popup/withdraw/index.vue'
import WithdrawInfo from '@/view/popup/withdraw/info.vue'
import WithdrawConfirm from '@/view/popup/withdraw/confirm.vue'
import WithdrawSuccess from '@/view/popup/withdraw/success.vue'
import RiskWarning from '@/view/popup/withdraw/risk-warning.vue'
import WithdrawPaypal from '@/view/popup/withdraw/paypal.vue'
import WithdrawHome from '@/view/popup/withdraw/home.vue'
import Transactions from '@/view/popup/transactions.vue'

import TopUp from '@/view/popup/top-up/index.vue'
import TopUpInfo from '@/view/popup/top-up/info.vue'
import TopUpHome from '@/view/popup/top-up/home.vue'

import CurrencyDetail from '@/view/popup/currency-detail.vue'

import Setting from '@/view/popup/setting/index.vue'

// 2. 定义路由配置
const routes = [
    {
        path: '/',
        name: 'tabcontent',
        component: Tabcontent,
        children: [
            {
                path: "",
                name: 'home',
                component: Home
            },
            {
                path: "NFT",
                name: 'NFT',
                component: NFT
            },
            {
                path: "message",
                name: 'message',
                component: Message
            },
            {
                path: "more",
                name: 'more',
                component: More
            },
        ]
    },
    {
        path: '/withdraw',
        name: 'withdraw',
        component: Withdraw,
        children: [
            {
                path: 'home',
                name: 'WithdrawHome',
                component: WithdrawHome
            },
            {
                path: 'info',
                name: 'WithdrawInfo',
                component: WithdrawInfo,
            },
            {
                path: 'confirm',
                name: 'WithdrawConfirm',
                component: WithdrawConfirm,
            },
            {
                path: 'risk',
                name: 'RiskWarning',
                component: RiskWarning,
            },
            
            {
                path: 'success',
                name: 'WithdrawSuccess',
                component: WithdrawSuccess,
            },
            {
                path: 'paypal',
                name: 'WithdrawPaypal',
                component: WithdrawPaypal,
            }
        ],
    },
    {
        path: '/top-up',
        name: 'TopUp',
        component: TopUp,
        children: [
            {
                path: 'home',
                name: 'TopUpHome',
                component: TopUpHome
            },
            {
                path: 'info',
                name: 'TopUpInfo',
                component: TopUpInfo
            },

        ]
    },
    {
        path: '/transactions',
        name: 'Transactions',
        component: Transactions
    },
    {
        path: '/NFTDetail',
        name: 'NFTDetail',
        component: NFTDetail
    },
    {
        path: '/currencyDetail',
        name: 'currencyDetail',
        component: CurrencyDetail
    },
    {
        path: '/setting',
        name: 'setting',
        component: Setting
    }
]


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

    // 4. 采用hash 模式
    history: createWebHashHistory('popup.html'),
    // 采用 history 模式
    // history: createWebHistory('popup.html'),
    routes, // short for `routes: routes`
});
console.log(process.env.BASE_URL)

export default router