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

import { LayoutA } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: LayoutA,
    meta: {
      icon: 'lucide:layout-dashboard',
      order: -1,
      title: $t('dashboard.title'),
    },
    name: 'Dashboard',
    path: '/',
    children: [
      {
        name: 'Home',
        path: '/home',
        component: () => import('#/views/dashboard/home/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: $t('dashboard.home'),
        },
      },
      {
        name: 'ApplicationManagement',
        path: '/application-management',
        component: () =>
          import('#/views/dashboard/application-management/index.vue'),
        meta: {
          icon: 'carbon:application',
          title: $t('homeModule.applicationManagement'),
        },
      },
      {
        name: 'SalesPartners',
        path: '/sales-partners',
        component: () => import('#/views/dashboard/sales-partners/index.vue'),
        meta: {
          icon: 'carbon:user-multiple',
          title: $t('homeModule.salesPartners'),
        },
      },
      {
        name: 'DeliveryPartners',
        path: '/delivery-partners',
        component: () =>
          import('#/views/dashboard/delivery-partners/index.vue'),
        meta: {
          icon: 'carbon:truck',
          title: $t('homeModule.deliveryPartners'),
        },
      },
      {
        name: 'EnterpriseCustomers',
        path: '/enterprise-customers',
        component: () =>
          import('#/views/dashboard/enterprise-customers/index.vue'),
        meta: {
          icon: 'carbon:building',
          title: $t('homeModule.enterpriseCustomers'),
        },
      },
      {
        name: 'UserProfile',
        path: 'user-profile',
        component: () => import('#/views/dashboard/user-profile/index.vue'),
        meta: {
          icon: 'carbon:user',
          title: '个人信息',
        },
      },
      {
        name: 'ToolDownloads',
        path: 'tool-downloads',
        component: () => import('#/views/dashboard/tool-downloads/index.vue'),
        meta: {
          icon: 'carbon:download',
          title: '工具下载',
        },
      },
    ],
  },
  {
    name: 'JumpToEnterprise',
    path: '/jumpToEnterprise',
    component: () => import('#/views/jump-to-enterprise/index.vue'),
  },
];

export default routes;
