import type { RouteRecordRaw } from 'vue-router'

export const membershipApplicationPublicRoutes: RouteRecordRaw[] = [
  {
    path: '/apply-membership',
    name: 'membership-application-apply',
    component: () => import('./pages/MembershipApplication.vue'),
    meta: { public: true, module: 'membership-application' },
  },
]

export const membershipApplicationLayoutRoutes: RouteRecordRaw[] = [
  {
    path: 'membership-applications',
    name: 'list-membership-applications',
    component: () => import('./pages/MembershipApplicationList.vue'),
    meta: {
      title: 'Senarai Permohonan Keahlian',
      module: 'membership-application',
      permission: 'lihat permohonan keahlian',
    },
  },
  {
    path: 'membership-applications/:id',
    name: 'view-membership-application',
    component: () => import('./pages/MembershipApplicationDetail.vue'),
    meta: {
      title: 'Butiran Permohonan Keahlian',
      module: 'membership-application',
      permission: 'lihat permohonan keahlian',
    },
  },
  {
    path: 'membership-applications/:id/edit',
    name: 'edit-membership-application',
    component: () => import('./pages/MembershipApplicationEdit.vue'),
    meta: {
      title: 'Kemaskini Permohonan Keahlian',
      module: 'membership-application',
      permission: 'kemaskini permohonan keahlian',
    },
  },
]
