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

import Renderer from '#/components/renderer/index.vue';
import { VITE_RENDERER_URL } from '#/constants';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/example',
    name: 'Example',
    redirect: '/example/echart',
    meta: {
      title: '示例',
      icon: 'ant-design:edit-outlined',
    },
    children: [
      {
        path: '/example/echart',
        name: 'Echart',
        meta: {
          // 移除 hideInMenu: true 或将其设置为 false
          hideInMenu: false,
          title: 'Echart 图表',
          icon: 'ant-design:list',
        },
        component: Renderer,
        props: {
          url: `${VITE_RENDERER_URL}`,
          fileId: '13a9dmbz',
          projectId: 22,
        },
      },
      {
        path: '/example/table',
        name: 'Table',
        meta: {
          // 移除 hideInMenu: true 或将其设置为 false
          hideInMenu: false,
          title: 'Table 表格',
          icon: 'ant-design:list',
        },
        component: Renderer,
        props: {
          url: `${VITE_RENDERER_URL}`,
          fileId: '13a9dmbz',
          projectId: 22,
        },
      },
    ],
  },
];

export default routes;
