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

const routes = [
  {
    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/ChartOrderPane.vue'),
      },
      {
        path: '/place',
        name: 'Place',
        // 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/ChartOrderPane.vue'),
      },
      {
        path: '/vault',
        name: 'Vault',
        // 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" */ '@/views/VaultView.vue'),
      },
      {
        path: '/orders',
        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" */ '@/views/OrdersView.vue'),
      },
/*
      {
        path: '/create',
        name: 'Create',
        component: () => import(/!* webpackChunkName: "chartorder" *!/ '@/components/chart/ChartOrderPane.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
