import { create } from "@zjxpcyc/react-tiny-store";

const useSystemModel = create(({ setState }) => {
  const state = {
    hashRoute: true,
    theme: 'light',
    app: {
      fullName: '不相容岗位管理系统',
      shorName: '不相容岗位管理',
      company: ''
    }
  }

  const updateTheme = (theme) => setState(x => ({ ...x, theme }));

  return {
    state,
    actions: { updateTheme },
  };
});

export default useSystemModel;
