"use strict";
var watch_utils_1 = require("./watch.utils");
var Rx = require('rx');
var debug = require('debug')('cb:command.run');
function promptForWatchCommand(cli, input, config) {
    var inquirer = require('inquirer');
    var topLevelWatchers = watch_utils_1.stripBlacklisted(Object.keys(input.watch));
    var prompt = topLevelWatchers.map(function (key) { return ({ name: key, value: key }); });
    var taskSelect = {
        type: "checkbox",
        message: "Select Watchers to run with <space>",
        name: "watch",
        choices: prompt,
        validate: function (answer) {
            if (answer.length < 1) {
                return "You must choose at least one watcher";
            }
            return true;
        }
    };
    return Rx.Observable.fromPromise(inquirer.prompt(taskSelect));
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = promptForWatchCommand;
//# sourceMappingURL=command.watch.interactive.js.map