/* PIUCHEBUONO APP
*/
import type {
  IListRoutes,
  ILang,
  IPreloadImages,
  ISites,
} from '@model'


const firstPage = {
  active: true,
  order: 5,
  path: '/',
  materialIcon: 'home',
  name: 'pages.home',
  component: () => import('@src/root/mainview/mainview.vue'),
  reqauth: false,
  inmenu: true,
  infooter: true,
}

function getDynamicPages(site: ISites): IListRoutes[] {

  const baseroutes: IListRoutes[] = [
    {
      active: true,
      order: 5,
      path: '/',
      materialIcon: 'home',
      name: 'pages.home',
      component: () => import('@src/root/mainview/mainview.vue'),
      reqauth: false,
      inmenu: true,
      infooter: true,
    },
    {
      active: true,
      order: 400,
      path: '/test',
      materialIcon: 'fas fa-test',
      name: 'mypages.test',
      component: () => import('@src/views/testServer/testServer.vue'),
      meta: { requiresAuth: true },
      inmenu: false,
      infooter: false,
    },

    /*{
      active: true,
      order: 20,
      path: '/events',
      materialIcon: 'fas fa-bullhorn',
      name: 'mypages.events',
      component: () => import('@src/root/eventi/eventi.vue'),
      meta: { requiresAuth: true },
      inmenu: true,
      infooter: true,
    },*/
    {
      active: site.confpages && site.confpages.showProfile,
      order: 120,
      path: '/myprofile',
      materialIcon: 'fas fa-user',
      name: 'pages.profile',
      component: () => import('@src/views/user/myprofile/myprofile.vue'),
      meta: { requiresAuth: true },
      inmenu: true,
      infooter: true,
    },
    {
      active: true,
      order: 120,
      path: '/install_site',
      materialIcon: 'fas fa-user',
      name: 'pages.install_site',
      component: () => import('@src/views/admin/install_site/install_site.vue'),
      meta: { requiresAuth: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 120,
      path: '/editprofile',
      materialIcon: 'fas fa-user',
      name: 'pages.profile3',
      component: () => import('@src/views/user/editprofile/editprofile.vue'),
      meta: { requiresAuth: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: site.confpages && site.confpages.showiscrittiMenu,
      order: 130,
      path: '/friends',
      materialIcon: 'fas fa-user-friends',
      name: 'mypages.iscritti',
      component: () => import('@src/views/user/myfriends/myfriends.vue'),
      meta: { requiresAuth: true },
      inmenu: true,
      infooter: true,
    },
    {
      active: site.confpages && site.confpages.enableCircuits,
      order: 16,
      path: '/circuits',
      materialIcon: 'fas fa-coins',
      name: 'mypages.circuits',
      component: () => import('@src/views/user/mycircuits/mycircuits.vue'),
      meta: { requiresAuth: true },
      inmenu: true,
      infooter: true,
      onlyAdmin: true,
      onlyManager: true,
    },
    {
      active: site.confpages && site.confpages.enableGroups,
      order: 132,
      path: '/groups',
      materialIcon: 'fas fa-users',
      name: 'mypages.groups',
      component: () => import('@src/views/user/mygroups/mygroups.vue'),
      meta: { requiresAuth: true },
      inmenu: true,
      infooter: false,
      onlyAdmin: true,
      onlyManager: true,
    },
    {
      active: true,
      order: 136,
      path: '/grp/:groupname',
      materialIcon: 'fas fa-user',
      name: 'proj.group2',
      component: () => import('@src/views/user/mygroup/mygroup.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 137,
      path: '/circuit/:path',
      materialIcon: 'fas fa-user',
      name: 'proj.circuit2',
      component: () => import('@src/views/user/mycircuit/mycircuit.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      path: '/separator',
      name: 'separator',
      order: 140,
      isseparator: true,
      inmenu: true,
    },
    {
      active: true,
      order: 130,
      path: '/mypage/:idBacheca',
      materialIcon: 'fas fa-user',
      name: 'pages.mypage2',
      component: () => import('@src/views/user/mypagebacheca/mypagebacheca.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 130,
      path: '/myservice/:idSkill',
      materialIcon: '',
      name: 'pages.myservice2',
      component: () => import('@src/views/user/myservice/myservice.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 135,
      path: '/myhosps/:idHosp',
      materialIcon: '',
      name: 'pages.myhosps2',
      component: () => import('@src/views/user/mypagehosp/mypagehosp.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 132,
      path: '/mygood/:idGood',
      materialIcon: '',
      name: 'pages.mygood2',
      component: () => import('@src/views/user/mypagegood/mypagegood.vue'),
      meta: { requiresAuth: true, newpage: true },
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 150,
      path: '/fundraising',
      materialIcon: 'fas fa-hand-holding-heart',
      name: 'pages.fundraising',
      component: () => import('@src/root/fundraising/fundraising.vue'),
      inmenu: false,
      infooter: false,
    },
    {
      active: true,
      order: 80,
      path: '/calendario-eventi',
      materialIcon: 'event',
      name: 'ris.calendario_eventi_riso',
      component: () => import('@src/root/calendarioeventi/calendarioeventi.vue'),
      extraclass: 'isCalendar',
      inmenu: false,
      infooter: false
    },
  ]

  return baseroutes
}

export function firstimagehome() {

  let img = 'statics/images/background.jpg'
  return img
}

const preLoadImages: IPreloadImages[] = []

export const lang_available: ILang[] = []
export const arrLangUsed: string[] = []

export const preloadedimages = []

export const routes: IListRoutes[] = [firstPage]

export const static_data = {
  routes,
  arrLangUsed,
  getDynamicPages,
  lang_available,
  preLoadImages,
  preloadedimages,
}
