text: const { app, dialog, ipcMain, BrowserWindow } = require('electron');
  const path = require('path');
  
  function createWindow() {
    const mainWindow = new BrowserWindow({
      width: 720,
      height: 480,
      webPreferences: {
        nodeIntegration: true,
        contextIsolation: false,
        enableRemoteModule: true,
      },
    });
  
    // Hide Menu
    // mainWindow.setMenu(null);
    mainWindow.loadFile('src/format.html');
  
    // Open the DevTools.
    // mainWindow.webContents.openDevTools();
  }
  
  app.whenReady().then(() => {
    createWindow();
  
    ipcMain.handle('select_folder', async (event) => {
      const path = dialog.showOpenDialogSync({
        properties: ['createDirectory', 'openDirectory'],
      });
      return path;
    });
  
    app.on('activate', function () {
      if (BrowserWindow.getAllWindows().length === 0) createWindow();
    });
  });
  
  app.on('window-all-closed', function () {
    if (process.platform !== 'darwin') app.quit();
  });
  