import { queenApi } from "queenjs";
import { LauncherModule } from "..";
import { Application } from "../objects/Application";

export const actions = LauncherModule.action({
  init() {
    this.store.setApps([
      new Application("queengine", { visible: true, disable: true }),
      new Application("queentree", { visible: true }),
      new Application("queenter", { visible: true }),
    ]);
  },
  async updateHost() {
    const host = await queenApi.showInput({
      title: "设置Host",
      defaultValue: this.store.host,
    });
    this.store.setHost(host);
  },
});
