import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      { path: '', component: () => import('src/pages/IndexPage.vue') },
      { path: 'about', component: () => import('src/pages/AboutUsPage.vue') },
      { path: 'services', component: () => import('src/pages/ServicesPage.vue') },
      { path: 'doctors', component: () => import('src/pages/DoctorsPage.vue') },
      { path: 'doctordetails', component: () => import('src/pages/DoctorDetailPage.vue') },
      { path: 'contact', component: () => import('src/pages/ContactUsPage.vue') },
      {
        path: 'login',
        component: () => import('pages/dev/LoginPage.vue'),
      },
      {
        path: 'signup',
        component: () => import('pages/dev/SignupPage.vue'),
      },
      {
        path: 'recoverpassword',
        component: () => import('pages/dev/RecoverPasswordPage.vue'),
      },
    ],
  },
  {
    path: '/dev',
    component: () => import('layouts/DevLayout.vue'),
    children: [
      { path: '', component: () => import('src/pages/dev/IndexPage.vue') },
      {
        path: 'reset-password',
        component: () => import('pages/dev/ResetPasswordPage.vue'),
      },
      {
        path: 'api/endpoints',
        component: () => import('pages/dev/ApiEndpointsPage.vue'),
      },
      {
        path: 'api/mail-debug',
        component: () => import('pages/dev/MailDebugPage.vue'),
      },
    ],
  },
  {
    path: '/admin',
    component: () => import('layouts/AdminLayout.vue'),
    children: [
      { path: '', component: () => import('src/pages/admin/IndexPage.vue') },
      {
        path: 'users',
        component: () => import('pages/admin/UsersPage.vue'),
      }
    ],
  },
  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue'),
  },
];

export default routes;
