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

import type { AuthorityDataList } from '@vben/types';

// 导出动态路由
export const dynamicRoutes: RouteRecordRaw[] = [];

// 异步设置动态路由
export function setDynamicRoutes(routes: AuthorityDataList[]) {
  dynamicRoutes.length = 0;
  dynamicRoutes.push(...(routes as unknown as RouteRecordRaw[]));
}
