import { IconArrowDownCircleLine } from '@halo-dev/components';
import { definePlugin } from '@halo-dev/ui-shared';
import { markRaw } from 'vue';

export default definePlugin({
  components: {},
  routes: [
    {
      parentName: 'Root',
      route: {
        path: '/resource-manager',
        name: 'ResourceManager',
        component: () => import('@/views/ResourceManager.vue'),
        meta: {
          title: '资源访问管理',
          permissions: ['plugin:sharelink:view'],
          menu: {
            name: '资源访问管理',
            group: 'content',
            icon: markRaw(IconArrowDownCircleLine),
            priority: 52,
          },
        },
      },
    },
    {
      parentName: 'Root',
      route: {
        path: '/download-manager',
        name: 'DownloadManagerRedirect',
        redirect: '/resource-manager',
      },
    },
    {
      parentName: 'Root',
      route: {
        path: '/link-manager',
        name: 'LinkManagerRedirect',
        redirect: '/resource-manager',
      },
    },
  ],
  extensionPoints: {},
});
