import type { RouteRecordRaw } from 'vue-router'

const Layout = () => import('@/layouts/index.vue')

const routes: RouteRecordRaw[] = [
  {
    path: '/daas/model/object',
    component: Layout,
    redirect: '/daas/model/object/index',
    name: 'daasModel',
    meta: {
      title: '对象定义',
      icon: 'ep:coin',
    },
    children: [
      {
        path: 'index',
        name: 'daasModelList',
        component: () => import('@/views/daas/model/index.vue'),
        meta: {
          title: '对象定义',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/daas/data',
        },
      },
      {
        path: 'daas/model/object/:modelId/:objectId',
        name: 'daasObjectEdit',
        component: () => import('@/views/daas/object/index.vue'),
        meta: {
          title: '对象编辑',
          sidebar: false,
          activeMenu: '/daas/model/',
          cache: true,
          noCache: 'daasObjectEdit',
        },
      },
    ],
  },
  {
    path: '/daas/model/manipulation',
    component: Layout,
    redirect: '/daas/model/manipulation/behavior',
    name: 'daasManipulation',
    meta: {
      title: '对象操作',
      icon: 'ic:twotone-double-arrow',
    },
    children: [
      {
        path: 'behavior',
        name: 'daasManipulationList',
        component: () => import('@/views/daas/manipulation/index.vue'),
        meta: {
          title: '对象操作',
          sidebar: false,
        },
      },
    ],
  },
]
export default routes
