import { pathToFileURL } from 'url';
import { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [


  {
    path: '/',
    component: () => import('layouts/StartLayout.vue'),
    children: [
      { path: '', component: () => import('pages/IndexPage.vue') },
    ],
  },
  {
    path: '/test',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      // { path: '', component: () => import('pages/IndexPage.vue') },
      { path: '//privacypolicy', component: () => import('pages/PrivacyPolicy.vue'),meta: { requiresAuth: false }, },
      { path: '/endlesscanvas', component: () => import('pages/EndlessPage.vue'),meta: { requiresAuth: true }, },
      { path: '/user', component: () => import('pages/UserProfile.vue'),meta: { requiresAuth: true }, },


      { path: '/zareg', component: () => import('pages/RegistrStr.vue') ,meta: { requiresAuth: false },},
      { path: '/register', name: 'IndexPage', component: () => import('pages/RegistrationPage.vue'),meta: { requiresAuth: false }, },
      { path: '/profil', component: () => import('pages/ProfilPage.vue') ,meta: { requiresAuth: true },},
    ],
  },

  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue'),
  },
  // {
  //   path: '/user',
  //   name: 'PhaserTest',
  //   component: () => import('pages/UserProfile.vue')
  // }

];

export default routes;
