// Composables
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/home',
    component: () => import('@/corp/CorpLayout.vue'),
    children: [
      {
        path: '',
        component: () => import(/* webpackChunkName: "vaultview" */ '@/corp/Home.vue'),
      }
    ]
  },
  {
    path: '/',
    component: () => import('@/layouts/chart/ChartLayout.vue'),
    children: [
      {
        path: '/',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        // component: () => import(/* webpackChunkName: "chartorder" */ '@/components/chart/ChartPlaceOrder.vue'),
        component: () => import(/* webpackChunkName: "vaultview" */ '@/components/chart/ChartVault.vue'),
      },
      {
        path: '/order',
        name: 'Edit',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "chartorder" */ '@/components/chart/ChartPlaceOrder.vue'),
      },
      {
        path: '/assets',
        name: 'Assets',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "vaultview" */ '@/components/chart/ChartVault.vue'),
      },
      {
        path: '/status',
        name: 'Orders',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "ordersview" */ '@/components/chart/ChartStatus.vue'),
      },
/*
      {
        path: '/order',
        name: 'Create',
        component: () => import(/!* webpackChunkName: "chartorder" *!/ '@/components/chart/ChartPlaceOrder.vue'),
      },
      {
        path: '/twap',
        name: 'TWAP',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/!* webpackChunkName: "twap" *!/ '@/components/TimedOrder.vue'),
      },
      {
        path: '/ladder',
        name: 'Ladder',
        component: () => import(/!* webpackChunkName: "ladder" *!/ '@/components/LadderOrder.vue'),
      },
      {
        path: '/diagonal',
        name: 'Diagonal',
        component: () => import(/!* webpackChunkName: "diagonal" *!/ '@/components/DiagonalOrder.vue'),
      },
      {
        path: '/custom',
        name: 'Custom',
        component: () => import(/!* webpackChunkName: "custom" *!/ '@/components/CustomOrder.vue'),
      },
*/
    ],
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
})

export default router
