const {app, Menu, Tray} = require('electron')
const main_window = require('./windows.js/main.js')



module.exports = ()=>{


    let tray = new Tray(global.dir+'/app.ico')
    const contextMenu = Menu.buildFromTemplate([
        {label: 'Open', click(){ main_window.open() }},
        /*{label: 'About',click() { console.log('item 1 clicked') }},
        {label: 'Item1', type: 'radio'},
        {type: 'separator'},
        {label: 'Item2', type: 'radio'},
        {label: 'Item3', type: 'radio', checked: true},*/
        {label: 'Beenden', click() { main_window.close(); }},
    ])
    tray.setToolTip('Cyb3r Downloader.')
    tray.setContextMenu(contextMenu)

    main_window.createWindow();
    main_window.open();

    return tray;
}
