import AppLayout from '@/layout/AppLayout.vue';
import { createRouter, createWebHistory } from 'vue-router';

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: AppLayout,
      meta: {
        auth: true
      },
      children: [
        {
          path: '/',
          name: 'dashboard',
          component: () => import('@/views/pages/ksDocuments/KsDocuments.vue')
        },
        {
          path: '/ksdocuments', 
          children: [
            {path: '', name: 'ks-document', component: () => import('@/views/pages/ksDocuments/KsDocuments.vue')},
            {path: 'new', name: 'ks-document-new', component: () => import('@/views/pages/ksDocuments/KsNewDocumentForm.vue')},
          ]
        },
        {
          path: '/ks_git_repos',
          children: [
              {path: '', name: 'ks-git-repos', component: () => import('@/views/pages/ksGitRepo/KsGitRepos.vue')},
              //{path: 'new', name: 'ks-git-repo-new', component: () => import('@/views/pages/ksGitRepo/KsNewGitRepoForm.vue')},        
              //{path: '/clone', name: 'ks-git-clone-repo', component: () => import('@/views/pages/ksGitRepo/KsGitCloneRepoForm.vue')},
              {path: 'ks_code_parser', name: 'ks_code_parser', component: () => import('@/views/pages/ksGitRepo/ksCodeParser/KsGitCodeParser.vue')}
          ]
        },
        {
          path: '/ks_similarity_search', 
          children: [
            {path: '', name: 'ks_similarity_search', component: () => import('@/views/pages/similaritySearch/KsSimilaritySearch.vue')},
          ]
        },
        {
          path: '/ks_vector_data', 
          children: [
            {path: '', name: 'ks_vector_data', component: () => import('@/views/pages/vectorDBSearch/KsVectorData.vue')},
          ]
        },
        {
          path: '/kstexts', 
          children: [
            {path: '', name: 'ks-texts', component: () => import('@/views/pages/KsTexts.vue')},
          ]
        },
      ]
    },
    {
      path: '/auth/login',
      name: 'login',
      component: () => import('@/views/pages/auth/Login.vue')
    },
  ]
});

export default router;