var uniflash;
(function (uniflash) {
    var ds;
    (function (ds) {
        var AgentInstallDialog = (function () {
            function AgentInstallDialog(uibModal, ufSession) {
                this.uibModal = uibModal;
                this.ufSession = ufSession;
            }
            AgentInstallDialog.prototype.show = function (installWizardObj) {
                function AgentInstallDialogController() {
                    var vm = this;
                    vm.wizardObj = installWizardObj;
                    // treat the finish step as a normal install step
                    vm.wizardObj.steps.push(vm.wizardObj.finishStep);
                    vm.getActionButtonText = function (action) {
                        return action.text.split('$');
                    };
                    vm.cancelClicked = function ($dismiss) {
                        $dismiss(new ti_common.CancelError('Cloud Agent Installation Canceled.'));
                    };
                }
                var modalInstance = this.uibModal.open({
                    templateUrl: 'ds/agent_install_dialog.html',
                    controllerAs: 'vm',
                    controller: AgentInstallDialogController
                });
                return modalInstance.result;
            };
            AgentInstallDialog.$inject = ['$uibModal', 'ufSession'];
            return AgentInstallDialog;
        }());
        ds.AgentInstallDialog = AgentInstallDialog;
        angular.module('uniflash').service('ufAgentInstallDialog', AgentInstallDialog);
    })(ds = uniflash.ds || (uniflash.ds = {}));
})(uniflash || (uniflash = {}));
