text: "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 __metadata = (this && this.__metadata) || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var core_1 = require("@angular/core");
  var ng_bootstrap_1 = require("@ng-bootstrap/ng-bootstrap");
  var health_service_1 = require("./health.service");
  var JhiHealthModalComponent = /** @class */ (function () {
      function JhiHealthModalComponent(healthService, activeModal) {
          this.healthService = healthService;
          this.activeModal = activeModal;
      }
      JhiHealthModalComponent.prototype.baseName = function (name) {
          return this.healthService.getBaseName(name);
      };
      JhiHealthModalComponent.prototype.subSystemName = function (name) {
          return this.healthService.getSubSystemName(name);
      };
      JhiHealthModalComponent.prototype.readableValue = function (value) {
          if (this.currentHealth.name !== 'diskSpace') {
              return value.toString();
          }
          // Should display storage space in an human readable unit
          var val = value / 1073741824;
          if (val > 1) {
              return val.toFixed(2) + ' GB';
          }
          else {
              return (value / 1048576).toFixed(2) + ' MB';
          }
      };
      JhiHealthModalComponent = __decorate([
          core_1.Component({
              selector: 'jhi-health-modal',
              templateUrl: './health-modal.component.html'
          }),
          __metadata("design:paramtypes", [health_service_1.JhiHealthService, ng_bootstrap_1.NgbActiveModal])
      ], JhiHealthModalComponent);
      return JhiHealthModalComponent;
  }());
  exports.JhiHealthModalComponent = JhiHealthModalComponent;
  //# sourceMappingURL=health-modal.component.js.map