/*
 * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
 * @Date: 2022-06-09 20:41:05
 * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
 * @LastEditTime: 2022-06-14 20:55:22
 * @FilePath: /bkunyun/src/store/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import * as React from "react";
import { configure } from "mobx";
import permissionStore from "./modules/permission";
import menuStore from "./modules/menu";
import currentProjectStore from "./modules/currentProject";
import fileListStore from "./modules/fileList";

configure({ enforceActions: "always" });

export const stores = { permissionStore, menuStore, currentProjectStore, fileListStore };

/** Store类型 */
export type Stores = typeof stores;

export const CounterContext = React.createContext(stores);

export const useStores = () => React.useContext(CounterContext);
