import { useCollectStore } from "@/store/collect";
import BugReporter from "../BugReporter";
import { useAuthStore } from "@/store/auth";

/**
 * 说明：
 * * 应用初始化逻辑。
 */
export function useAppInit() {
  
  const collectStore = useCollectStore();
  const authStore = useAuthStore();

  return {
    async init() {
      //加载采集板块信息
      await collectStore.loadCollectableModules();
      //设置日志用户ID
      BugReporter.setUserId(authStore.userInfo?.id.toString() || '');
    },
  }
}
