import { autoUpdater } from "electron-updater";

function checkForAppUpdatesContinuously(): void {
  checkForAppUpdates();
  setInterval(
    () => {
      checkForAppUpdatesContinuously();
    },
    1000 * 60 * 30,
  );
}
function checkForAppUpdates(): void {
  autoUpdater.checkForUpdatesAndNotify({
    title: "Shop Partner Update",
    body: "A new version of Shop Partner is available. Click to update.",
  });
}

export { checkForAppUpdatesContinuously, checkForAppUpdates };
