"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * penguins-eggs
 * lib: select_interface.ts
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 */
const inquirer = require('inquirer');
async function selectInterface(iface = 'eth0', ifaces) {
    const questions = [
        {
            type: 'list',
            name: 'option',
            message: 'Select interface: ',
            choices: ifaces,
            default: iface,
        },
    ];
    return new Promise(function (resolve) {
        inquirer.prompt(questions).then(function (options) {
            resolve(options.option);
        });
    });
}
exports.default = selectInterface;
