"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var electron_1 = require("electron");
var about_window_1 = require("about-window");
function build(main_window) {
    var template = [
        {
            label: 'Shiba',
            submenu: [
                {
                    label: 'About Shiba',
                    click: function () { return about_window_1.default({
                        icon_path: path.join(__dirname, '..', '..', 'images', 'shibainu.png'),
                        copyright: 'Copyright (c) 2015 rhysd',
                    }); },
                },
                {
                    type: 'separator',
                },
                {
                    label: 'Restart',
                    click: function () { return main_window.reload(); },
                },
                {
                    label: 'DevTools',
                    click: function () { return main_window.webContents.openDevTools({ mode: 'detach' }); },
                },
                {
                    label: 'Quit',
                    accelerator: 'Command+Q',
                    click: function () { return main_window.close(); },
                },
            ],
        },
        {
            label: 'Actions',
            submenu: [
                {
                    label: 'Copy',
                    accelerator: 'Command+C',
                    role: 'copy',
                },
                {
                    label: 'Select All',
                    accelerator: 'Command+A',
                    role: 'selectall',
                },
                {
                    type: 'separator',
                },
                {
                    label: 'Choose File',
                    click: function () { return main_window.webContents.send('shiba:choose-file'); },
                },
                {
                    label: 'Lint Result',
                    click: function () { return main_window.webContents.send('shiba:lint'); },
                },
                {
                    label: 'Outline',
                    click: function () { return main_window.webContents.send('shiba:outline'); },
                },
                {
                    label: 'Search',
                    click: function () { return main_window.webContents.send('shiba:search'); },
                },
                {
                    label: 'Reload',
                    click: function () { return main_window.webContents.send('shiba:reload'); },
                },
                {
                    label: 'Print',
                    click: function () { return main_window.webContents.print(); },
                },
            ],
        },
    ];
    var menu = electron_1.Menu.buildFromTemplate(template);
    electron_1.Menu.setApplicationMenu(menu);
    return menu;
}
exports.build = build;
//# sourceMappingURL=menu.js.map