import './index.less';
import { BasicLayoutProps } from '@ant-design/pro-layout';
import { sessionStore } from './utils/store';
import {
  headerRender,
  subMenuItemRender,
  menuItemRender,
  onPageChange,
  menuDataRender,
} from './utils/layout';
export { default as patchRoutes } from './utils/patchRoutes';
export { default as render } from './utils/render';

// 设置登录黑名单路由地址集合
sessionStore.set('login-black-route-list', []);
// 设置纯净布局路由地址集合，没有顶部和菜单栏
sessionStore.set('layout-hide-route-list', []);
// 设置无菜单栏路由地址集合
sessionStore.set('layout-menu-hide-route-list', []);
// 设置权限路由相关的路由地址集合
sessionStore.set('authorized-relative-route-list', [
  {
    parent: '/sysSetting/dict',
    pathList: ['/sysSetting/dict/data'],
  },
]);
// 设置非权限路由地址集合
sessionStore.set('unauthorized-route-list', []);

export const layout: BasicLayoutProps = {
  layout: 'mix',
  navTheme: 'light',
  headerRender,
  subMenuItemRender,
  menuItemRender,
  menuDataRender,
  onPageChange,
};
