import type { IListRoutes, ISites } from '@src/model'

function getRoutesAI(site: ISites) {

  const routes_ai: IListRoutes[] = [
    {
      active: true,
      order: 30,
      path: '/ai',
      materialIcon: 'fas fa-book',
      name: 'mypages.aitools',
      component: () => import('@src/views/toolsAI/main/main.vue'),
      inmenu: true,
      submenu: true,
      level_parent: 0,
      level_child: 0.5,
    },
  ]

  const routes_admin_ai: IListRoutes[] = [
    {
      active: true,
      order: 32,
      path: '/admin/ai/catAI',
      materialIcon: 'fas fa-file-alt',
      name: 'mypages.catAI',
      component: () => import('@src/rootgen/admin/catAI/catAI.vue'),
      inmenu: true,
      submenu: true,
      level_parent: 0,
      level_child: 0.5,
      onlyManager: true,
      onlyEditor: true
    },
    {
      active: true,
      order: 32,
      path: '/admin/ai/queryAI',
      materialIcon: 'fas fa-file-alt',
      name: 'mypages.queryAI',
      component: () => import('@src/rootgen/admin/queryAI/queryAI.vue'),
      inmenu: true,
      submenu: true,
      level_parent: 0,
      level_child: 0.5,
      onlyManager: true,
      onlyEditor: true
    },

  ]

  const menuAI = [
    {
      active: site.confpages && site.confpages.enableAI,
      path: '/ai',
      order: 1402,
      faIcon: 'fas fa-lemon',
      materialIcon: 'fas fa-lemon',
      name: 'mypages.toolsAI',
      routes2: routes_ai,
      inmenu: true,
      onlyif_logged: true,
      // onlySocioResidente: true,
      solotitle: true,
      infooter: true
    },
    ...routes_ai,
    {
      active: site.confpages && site.confpages.enableAI,
      path: '/admin/ai',
      order: 1420,
      materialIcon: 'next_week',
      name: 'mypages.admin_ai',
      routes2: routes_admin_ai,
      inmenu: true,
      solotitle: true,
      onlyAdmin: true,
      onlyManager: true,
      onlyDepartment: true
    },
    ...routes_admin_ai,
  ]

  return menuAI
}


export const routesAI = {
  routesAI: getRoutesAI,
}
