import { ESAC_VOUCHER_LIST } from '@/config/url-prefix'

export default [
  {
    path: '/',
    component: () => import('@/elements/templates/screens/SidebarFluid'),
    name: 'EsacDashboard',
    redirect: ESAC_VOUCHER_LIST + '/1',
    meta: {
      menuItem: false,
      requiresAuth: false,
    },
    children: [
      {
        path: ESAC_VOUCHER_LIST,
        component: () => {
          return import('@/app/esac/dashboard/components/EsacVoucherList')
        },
        name: 'EsacVoucherList',
        meta: {
          dashboardMenu: {
            displayName: 'Esac.EsacVoucherList.Title', // this is the sidebar title
            priority: 5,
            icon: 'sidebar-esac',
          },
          policy: {
            'esac-voucher': 'view',
          },
        },
        redirect: ESAC_VOUCHER_LIST + '/1',
      },
      {
        path: ESAC_VOUCHER_LIST + '/:page',
        component: () => import('@/app/esac/dashboard/components/EsacVoucherList'),
        name: 'EsacVoucherListHomePaginated',
        meta: {
          title: 'Esac.EsacVoucherList.Title',
          icon: 'beenhere',
        },
        props: {
          page: 1,
          default: true,
        },
      },
    ],
  },
]
