import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/components/commons/layout'
import * as Pages from '@/views'

export const routes: RouteRecordRaw[] = [
  {
    path: '/auth',
    name: 'auth',
    component: Pages.AuthPage,
    meta: { requiresAuth: false },
  },
  {
    path: '/',
    component: Layout,
    meta: { requiresAuth: true },
    children: [
      { path: '/utxo', name: 'utxo', component: Pages.UTXOPage },
      { path: 'wallet', name: 'wallet', component: Pages.WalletPage },
      {
        path: '/transaction-history',
        name: 'transaction-history',
        component: Pages.TransactionHistoryPage,
      },
      { path: '/settings', name: 'settings', component: Pages.SettingsPage },
    ],
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'not-found',
    component: () => import('@/views/NotFoundView.vue'),
  },
]
