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

const routes: Array<RouteRecordRaw> = [
  {
    path: '/admin',
    name: 'Admin',
    component: () => import( '../pages/admin/AdminPage.vue'),
    meta: { requiresAuth: true, roles: ['admin'] }
  },
  {
    path: '/',
    name: 'Home',
    component: () => import( '../pages/Home.vue'),
    meta: { /* pageHeader and pageSubHeader is optional */
      pageHeader: 'Main Header'
    },
  },
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: () => import( '../pages/DashBoard.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/customer/home',
    name: 'CustomerHome',
    component: () => import( '../pages/customer/CustomerHome.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/customer/search',
    name: 'CustomerSearch',
    component: () => import( '../pages/customer/CustomerSearch.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/customer/create',
    name: 'CustomerCreate',
    component: () => import( '../pages/customer/SimpleForm.vue'),
    meta: { requiresAuth: true }
  },
  {
    path: '/invoices/home',
    name: 'InvoiceHome',
    component: () => import( '../pages/invoices/InvoiceHome.vue'),
    meta: { requiresAuth: true }
  }
];
export default routes;
