'use strict';

const path = require('path');
const electron = require('electron');

module.exports = function showMainWindow() {
  const windowStateKeeper = require('electron-window-state');
  const window = require('electron-window');

  // Load the previous state with fallback to defaults
  const mainWindowState = windowStateKeeper({
    width: 750,
    height: 530
  });

  const mainWindow = window.createWindow({
    'x': mainWindowState.x,
    'y': mainWindowState.y,
    'width': mainWindowState.width,
    'height': mainWindowState.height
  });
  if (process.platform !== 'darwin') {
    mainWindow.setMenu(
      electron.Menu.buildFromTemplate([])
    );
  }
  mainWindowState.manage(mainWindow);
  const indexPath = path.resolve(
    __dirname,
    'src/index.html'
  );
  mainWindow.showUrl(indexPath, {});


};

