import defaultRoutes from '@router/common/routes';
import cardsRoutes from '@router/cards/routes';
import stepperRoutes from '@router/stepper/routes';
import sandboxRoutes from '@router/SANDBOX/routes';

const developmentRoutes = [];

if (process.env.NODE_ENV !== 'production') {
  developmentRoutes.push(...sandboxRoutes);
}

const routes = [
  {
    children: [
      {
        children: [...stepperRoutes, ...developmentRoutes],
        component: () => import('@components/common/layout/main/index.vue'),
        path: '',
      },
      {
        children: [...defaultRoutes],
        component: () => import('@components/common/layout/index/index.vue'),
        path: '',
      },
    ],
    path: '/',
    component: () => import('@components/common/layout/index/index.vue'),
  },
  {
    path: '/admin/',
    component: () => import('@components/common/layout/main/index.vue'),
  },
  {
    children: [...cardsRoutes],
    component: () => import('@components/common/layout/main/index.vue'),
    path: '/',
  },
  {
    path: '*',
    redirect: '/',
  },
];

export default routes;
