"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");
var dialog_service_ng1_1 = require("../../source/services/dialog/dialog.service.ng1");
exports.moduleName = 'PopupTestModule';
var PopupTestController = (function () {
    function PopupTestController(dialog) {
        this.dialog = dialog;
    }
    PopupTestController.prototype.$onInit = function () {
        this.popover = '<div>{{popup.content}}</div>';
        this.content = 'Some content';
    };
    PopupTestController.prototype.prompt = function () {
        this.dialog.prompt({
            acceptHandler: function () { alert('Yes'); },
            cancelHandler: function () { alert('No'); },
            okButton: 'Yes',
            cancelButton: 'No',
            message: 'Do you want to do this?',
        });
    };
    PopupTestController.prototype.openDialog = function () {
        this.dialog.open({
            template: "<rl-dialog>\n\t\t\t\t\t\t<rl-dialog-header>Header</rl-dialog-header>\n\t\t\t\t\t\t<rl-dialog-content>Content</rl-dialog-content>\n\t\t\t\t\t\t<rl-dialog-footer>Footer</rl-dialog-footer>\n\t\t\t\t\t</rl-dialog >",
        });
    };
    return PopupTestController;
}());
PopupTestController.$inject = [dialog_service_ng1_1.serviceName];
var PopupNg1BootstrapperComponent = (function () {
    function PopupNg1BootstrapperComponent() {
    }
    return PopupNg1BootstrapperComponent;
}());
PopupNg1BootstrapperComponent = __decorate([
    core_1.Component({
        selector: 'tsPopupNg1Bootstrapper',
        template: '<tsPopupNg1></tsPopupNg1>'
    })
], PopupNg1BootstrapperComponent);
exports.PopupNg1BootstrapperComponent = PopupNg1BootstrapperComponent;
var PopupNg1Directive = (function (_super) {
    __extends(PopupNg1Directive, _super);
    function PopupNg1Directive(elementRef, injector) {
        return _super.call(this, 'tsPopupNg1', elementRef, injector) || this;
    }
    return PopupNg1Directive;
}(static_1.UpgradeComponent));
PopupNg1Directive = __decorate([
    core_1.Directive({
        selector: 'tsPopupNg1'
    }),
    __metadata("design:paramtypes", [core_1.ElementRef, core_1.Injector])
], PopupNg1Directive);
exports.PopupNg1Directive = PopupNg1Directive;
angular.module(exports.moduleName, [])
    .component('tsPopupNg1', {
    template: require('./popupNg1.html'),
    controller: 'PopupTestController',
    controllerAs: 'popup',
})
    .controller('PopupTestController', PopupTestController);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wdXBCb290c3RyYXBwZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJwb3B1cEJvb3RzdHJhcHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzQ0FBMkU7QUFDM0Usa0RBQTJEO0FBQzNELGlDQUFtQztBQUVuQyxzRkFBcUg7QUFFeEcsUUFBQSxVQUFVLEdBQVcsaUJBQWlCLENBQUM7QUFFcEQ7SUFLQyw2QkFBb0IsTUFBeUQ7UUFBekQsV0FBTSxHQUFOLE1BQU0sQ0FBbUQ7SUFBSSxDQUFDO0lBRWxGLHFDQUFPLEdBQVA7UUFDQyxJQUFJLENBQUMsT0FBTyxHQUFHLDhCQUE4QixDQUFDO1FBQzlDLElBQUksQ0FBQyxPQUFPLEdBQUcsY0FBYyxDQUFDO0lBQy9CLENBQUM7SUFFRCxvQ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