const { app, Tray, Menu, nativeImage } = require('electron')

let tray

app.whenReady().then(() => {
  const icon = nativeImage.createFromDataURL('data:image/png;base64,[encoded data, 4276 characters]')
  tray = new Tray(icon)

  const contextMenu = Menu.buildFromTemplate([
    { label: 'Item1', type: 'radio' },
    { label: 'Item2', type: 'radio' },
    { label: 'Item3', type: 'radio', checked: true },
    { label: 'Item4', type: 'radio' }
  ])

  tray.setToolTip('This is my application.')
  tray.setContextMenu(contextMenu)
})
