const { app: e, BrowserWindow: t } = require("electron"), i = require("path");
function o() {
  const n = new t({
    width: 1200,
    height: 800,
    webPreferences: {
      nodeIntegration: !0,
      contextIsolation: !1
    }
  });
  process.env.NODE_ENV === "development" ? (n.loadURL("http://localhost:5173"), n.webContents.openDevTools()) : n.loadFile(i.join(__dirname, "../dist/index.html"));
}
e.whenReady().then(() => {
  o(), e.on("activate", () => {
    t.getAllWindows().length === 0 && o();
  });
});
e.on("window-all-closed", () => {
  process.platform !== "darwin" && e.quit();
});
