"use strict";
var ProgressIndicator = (function () {
    function ProgressIndicator($logger) {
        this.$logger = $logger;
    }
    ProgressIndicator.prototype.showProgressIndicator = function (future, timeout, options) {
        var _this = this;
        return (function () {
            var surpressTrailingNewLine = options && options.surpressTrailingNewLine;
            try {
                while (!future.isResolved()) {
                    _this.$logger.printMsgWithTimeout(".", timeout).wait();
                }
                future.wait();
            }
            catch (err) {
                _this.$logger.out();
                throw err;
            }
            if (!surpressTrailingNewLine) {
                _this.$logger.out();
            }
        }).future()();
    };
    return ProgressIndicator;
})();
exports.ProgressIndicator = ProgressIndicator;
$injector.register("progressIndicator", ProgressIndicator);
