const {app, BrowserWindow, dialog} = require('electron');

let mainWindow;

app.on('ready', () => {
  mainWindow = new BrowserWindow({
      height: 962,
      width: 962,
      fullscreenable: false,
      resizable : false
  });

  mainWindow.loadURL('file://' + __dirname + '/index.html');
});

const ipc = require('electron').ipcMain

ipc.on('open-information', function (event, arg) {
    const options = {
        type: 'info',
        title: 'Information',
        message: arg,
        buttons: ['OK']
    }
    dialog.showMessageBox(options, function (index) {
        event.sender.send('information-dialog', index)
    })
});
