"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var core_1 = require("@angular/core");
var rxjs_1 = require("rxjs");
var ButtonsNg2BootstrapperComponent = (function () {
    function ButtonsNg2BootstrapperComponent() {
        var _this = this;
        this.waitCallback = function () {
            return _this.wait(_this.action, 'Async button');
        };
    }
    ButtonsNg2BootstrapperComponent.prototype.action = function (name) {
        console.log('Action: ' + name);
    };
    ButtonsNg2BootstrapperComponent.prototype.wait = function (callback, name) {
        return rxjs_1.Observable.of(null).do(function () { return callback(name); }).delay(1000);
    };
    return ButtonsNg2BootstrapperComponent;
}());
ButtonsNg2BootstrapperComponent = __decorate([
    core_1.Component({
        selector: 'tsButtonsBootstrapper',
        template: require('./buttonsNg2.html'),
    })
], ButtonsNg2BootstrapperComponent);
exports.ButtonsNg2BootstrapperComponent = ButtonsNg2BootstrapperComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uc05nMkJvb3RzdHJhcHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImJ1dHRvbnNOZzJCb290c3RyYXBwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLHNDQUEwQztBQUMxQyw2QkFBa0M7QUFNbEMsSUFBYSwrQkFBK0I7SUFKNUM7UUFBQSxpQkFnQkM7UUFYQSxpQkFBWSxHQUE2QjtZQUN4QyxNQUFNLENBQUMsS0FBSSxDQUFDLElBQUksQ0FBQyxLQUFJLENBQUMsTUFBTSx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