"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const utils_1 = require("../../lib/utils");
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
/**
 *
 * @param this
 */
async function bootloaderConfigArch() {
    let cmd = '';
    if (this.efi) {
        try {
            cmd = `chroot ${this.installTarget} pacman -Sy grub efibootmgr} ${this.toNull}`;
            await (0, utils_1.exec)(cmd, this.echo);
        }
        catch (error) {
            console.log(error);
            await utils_2.default.pressKeyToExit(cmd, true);
        }
    }
    else {
        try {
            cmd = `chroot ${this.installTarget} pacman -Sy grub ${this.toNull}`;
            await (0, utils_1.exec)(cmd, this.echo);
        }
        catch (error) {
            console.log(error);
            await utils_2.default.pressKeyToExit(cmd, true);
        }
    }
}
exports.default = bootloaderConfigArch;
