"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
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 __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var static_1 = require("@angular/upgrade/static");
var angular = require("angular");
exports.moduleName = 'ButtonTestModule';
var ButtonTestController = (function () {
    function ButtonTestController($timeout) {
        var _this = this;
        this.$timeout = $timeout;
        this.waitCallback = function () {
            return _this.wait(_this.action, 'Async button');
        };
    }
    ButtonTestController.prototype.action = function (name) {
        console.log('Action: ' + name);
    };
    ButtonTestController.prototype.wait = function (callback, name) {
        return this.$timeout(function () { return callback(name); }, 1000);
    };
    return ButtonTestController;
}());
ButtonTestController.$inject = ['$timeout'];
var ButtonsNg1BootstrapperComponent = (function () {
    function ButtonsNg1BootstrapperComponent() {
    }
    return ButtonsNg1BootstrapperComponent;
}());
ButtonsNg1BootstrapperComponent = __decorate([
    core_1.Component({
        selector: 'tsButtonsNg1Bootstrapper',
        template: '<tsButtonsNg1></tsButtonsNg1>'
    })
], ButtonsNg1BootstrapperComponent);
exports.ButtonsNg1BootstrapperComponent = ButtonsNg1BootstrapperComponent;
var ButtonsNg1Directive = (function (_super) {
    __extends(ButtonsNg1Directive, _super);
    function ButtonsNg1Directive(elementRef, injector) {
        return _super.call(this, 'tsButtonsNg1', elementRef, injector) || this;
    }
    return ButtonsNg1Directive;
}(static_1.UpgradeComponent));
ButtonsNg1Directive = __decorate([
    core_1.Directive({
        selector: 'tsButtonsNg1'
    }),
    __metadata("design:paramtypes", [core_1.ElementRef, core_1.Injector])
], ButtonsNg1Directive);
exports.ButtonsNg1Directive = ButtonsNg1Directive;
angular.module(exports.moduleName, [])
    .component('tsButtonsNg1', {
    template: require('./buttonsNg1.html'),
    controller: 'ButtonTestController',
    controllerAs: 'button',
})
    .controller('ButtonTestController', ButtonTestController);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uQm9vdHN0cmFwcGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYnV0dG9uQm9vdHN0cmFwcGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHNDQUEyRTtBQUMzRSxrREFBMkQ7QUFDM0QsaUNBQW1DO0FBRXRCLFFBQUEsVUFBVSxHQUFXLGtCQUFrQixDQUFDO0FBRXJEO0lBTUMsOEJBQW9CLFFBQWlDO1FBQXJELGlCQUEwRDtRQUF0QyxhQUFRLEdBQVIsUUFBUSxDQUF5QjtRQUxyRCxpQkFBWSxHQUFtQztZQUM5QyxNQUFNLENBQUMsS0FBSSxDQUFDLElBQUksQ0FBQyxLQUFJLENBQUMsTUFBTSxFQUFFLGNBQWMsQ0FBQyxDQUFDO1FBQy9DLENBQUMsQ0FBQTtJQUd3RCxDQUFDO0lBRTFELHFDQUFNLEdBQU4sVUFBTyxJQUFZO1FBQ2xCLE9BQU8sQ0FBQyxHQUFHLENBQUMsVUFBVSxHQUFHLElBQUksQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFFRCxtQ0FBSSxHQUFKLFVBQUssUUFBUSxFQUFFLElBQUk7UUFDbEIsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsY0FBTSxPQ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