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

import WujieVueRendererAdapter from '@sy/wujie-vue3-renderer-adapter';

import { VITE_RENDERER_URL } from '#/constants';
import { router } from '#/router';

const routes: RouteRecordRaw[] = [
  {
    path: '/static-file',
    name: 'StaticFile',
    meta: {
      icon: 'ant-design:file',
      order: 2,
      title: '静态文件管理',
    },
    children: [
      {
        path: '/static-file/list',
        name: 'StaticFileList',
        component: WujieVueRendererAdapter,
        meta: {
          icon: 'ant-design:file-text',
          title: '静态文件列表',
        },
        props: {
          url: `${VITE_RENDERER_URL}`,
          fileId: '7pfr394d6',
          projectId: 4,
          name: '7pfr394d6',
          degrade: false,
          getRouter: () => router,
        },
      },
    ],
  },
];

export default routes;
