import { configure } from 'mobx';
import API from './api';
import { Session } from './utils';

configure({ enforceActions: 'observed' });

export interface API {
  user?: any;
}

export async function getInitialState(): Promise<API> {
  const user = Session.get();
  return { user };
}

export const qiankun = {
  // 应用加载之前
  async bootstrap(props: any) {},
  // 应用 render 之前触发
  async mount(props: any) {},
  // 应用卸载之后触发
  async unmount(props: any) {},
};
