export const routes = [
  { path: '/', redirect: '/dashboard' },

  {
    path: '/',
    component: () => import('@/layouts/default.vue'),
    children: [
      {
        path: 'dashboard',
        component: () => import('@/pages/dashboard.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'notifications',
        component: () => import('@/pages/notifications.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'franchisees',
        component: () => import('@/pages/franchisees/index.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'franchisee-groups',
        component: () => import('@/pages/franchisee-groups/index.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'programs',
        component: () => import('@/pages/programs/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'programs/add',
        component: () => import('@/pages/programs/AddProgram.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'programs/:id/edit',
        component: () => import('@/pages/programs/EditProgram.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'forms',
        name: 'forms',
        component: () => import('@/pages/forms/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'forms/add',
        component: () => import('@/pages/forms/AddForm.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'forms/edit/:id',
        component: () => import('@/pages/forms/AddForm.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'forms/submissions',
        component: () => import('@/pages/forms/SubmittedForms.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'forms/my-submissions',
        component: () => import('@/pages/forms/MySubmissions.vue'),
        meta: { requiresAuth: true, roles: ['franchise_admin'] },
      },
      {
        path: 'users',
        component: () => import('@/pages/users/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'account-settings',
        component: () => import('@/pages/account-settings.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'whatsapp',
        component: () => import('@/pages/whatsapp/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'whatsapp/templates/add',
        component: () => import('@/pages/whatsapp-templates/EditTemplate.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'whatsapp/templates/:id/edit',
        component: () => import('@/pages/whatsapp-templates/EditTemplate.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'whatsapp/messages/add',
        component: () => import('@/pages/whatsapp-messages/EditMessage.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'whatsapp/messages/:id/edit',
        component: () => import('@/pages/whatsapp-messages/EditMessage.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'pages/list',
        component: () => import('@/pages/all-pages/index.vue'),
      },
      {
        path: 'pages/add',
        component: () => import('@/pages/all-pages/add-page.vue'),
      },
      {
        path: 'pages/edit/:id',
        component: () => import('@/pages/all-pages/edit-page.vue'),
      },
      {
        path: 'pages/templates',
        component: () => import('@/pages/all-pages/page-templates.vue'),
      },
      {
        path: 'pages/approvals',
        component: () => import('@/pages/all-pages/page-approvals.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'pages/language-templates',
        component: () => import('@/pages/all-pages/LanguageTemplates.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'pages/language-templates/add',
        component: () => import('@/pages/all-pages/AddEditLanguageTemplate.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'pages/language-templates/:id/edit',
        component: () => import('@/pages/all-pages/AddEditLanguageTemplate.vue'),
        meta: { requiresAuth: true, roles: ['super_admin'] },
      },
      {
        path: 'typography',
        component: () => import('@/pages/typography.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'icons',
        component: () => import('@/pages/icons.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'cards',
        component: () => import('@/pages/cards.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'tables',
        component: () => import('@/pages/tables.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'form-layouts',
        component: () => import('@/pages/form-layouts.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'media',
        component: () => import('@/pages/media/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'activity-log',
        component: () => import('@/pages/activity-log/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'archives',
        component: () => import('@/pages/archives/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'payments',
        component: () => import('@/pages/payments/index.vue'),
        meta: { requiresAuth: true, roles: ['franchise_admin'] },
      },
    ],
  },

  {
    path: '/',
    component: () => import('@/layouts/blank.vue'),
    children: [
      {
        path: 'login',
        component: () => import('@/pages/login.vue'),
        meta: { requiresAuth: false },
      },
      {
        path: 'register',
        component: () => import('@/pages/register.vue'),
        meta: { requiresAuth: false },
      },
      {
        path: '/:pathMatch(.*)*',
        component: () => import('@/pages/[...error].vue'),
        meta: { requiresAuth: false },
      },
    ],
  },

  {
    path: '/testimonials',
    component: () => import('@/layouts/default.vue'),
    children: [
      {
        path: '',
        name: 'testimonials-list',
        component: () => import('@/pages/testimonials/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: 'add',
        name: 'testimonial-add',
        component: () => import('@/pages/testimonials/EditTestimonial.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: ':id/edit',
        name: 'testimonial-edit',
        component: () => import('@/pages/testimonials/EditTestimonial.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: '/activity',
        component: () => import('@/pages/activity/index.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: '/activity/add',
        component: () => import('@/pages/activity/AddActivity.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: '/activity/:id/edit',
        component: () => import('@/pages/activity/EditActivity.vue'),
        meta: { requiresAuth: true },
      },
      {
        path: '/teachers',
        component: () => import('@/pages/teachers/index.vue'),
        meta: { requiresAuth: true },
      },
    ],
  },
]
