import { appConfigDir } from "@tauri-apps/api/path"
import { setStoreCollectionPath } from "@tauri-store/valtio"
import { appStore } from "./app"
import { steamStore } from "./steam"
import { toolStore } from "./tool"
import path from "path"

export async function init() {
  await appStore.start()
  await toolStore.start()
  await steamStore.start()
  const appConfigDirPath = await appConfigDir()
  await setStoreCollectionPath(path.resolve(appConfigDirPath, "cstb"))
}
