text: import { __decorate, __metadata, __spread } from 'tslib';
  import { CommonModule } from '@angular/common';
  import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, NgModule } from '@angular/core';
  import { DelonLocaleService, DelonLocaleModule } from '@delon/theme';
  import { toNumber, InputNumber, DelonUtilModule } from '@delon/util';
  import { NgZorroAntdModule } from 'ng-zorro-antd';
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  var G2MiniProgressComponent = /** @class */ (function () {
      function G2MiniProgressComponent(i18n, cdr) {
          this.i18n = i18n;
          this.cdr = cdr;
          this.color = '#1890FF';
      }
      /**
       * @param {?} value
       * @return {?}
       */
      G2MiniProgressComponent.prototype.fixNum = /**
       * @param {?} value
       * @return {?}
       */
      function (value) {
          return Math.min(Math.max(toNumber(value), 0), 100);
      };
      /**
       * @return {?}
       */
      G2MiniProgressComponent.prototype.ngOnChanges = /**
       * @return {?}
       */
      function () {
          this.target = this.fixNum(this.target);
          this.percent = this.fixNum(this.percent);
          this.cdr.detectChanges();
      };
      G2MiniProgressComponent.decorators = [
          { type: Component, args: [{
                      selector: 'g2-mini-progress',
                      template: "<nz-tooltip [nzTitle]=\"i18n.getData('miniProgress').target + target + '%'\">\n  <div nz-tooltip class=\"g2-mini-progress__target\" [ngStyle]=\"{'left.%': target}\">\n    <span class=\"g2-mini-progress__target-item\" [ngStyle]=\"{'background-color': color}\"></span>\n    <span class=\"g2-mini-progress__target-item\" [ngStyle]=\"{'background-color': color}\"></span>\n  </div>\n</nz-tooltip>\n<div class=\"g2-mini-progress__wrap\">\n  <div class=\"g2-mini-progress__value\" [ngStyle]=\"{'background-color': color, 'width.%': percent, 'height.px':strokeWidth}\"></div>\n</div>\n",
                      host: { '[class.g2-mini-progress]': 'true' },
                      changeDetection: ChangeDetectionStrategy.OnPush
                  }] }
      ];
      /** @nocollapse */
      G2MiniProgressComponent.ctorParameters = function () { return [
          { type: DelonLocaleService },
          { type: ChangeDetectorRef }
      ]; };
      G2MiniProgressComponent.propDecorators = {
          color: [{ type: Input }],
          target: [{ type: Input }],
          percent: [{ type: Input }],
          strokeWidth: [{ type: Input }]
      };
      __decorate([
          InputNumber(),
          __metadata("design:type", Number)
      ], G2MiniProgressComponent.prototype, "target", void 0);
      __decorate([
          InputNumber(),
          __metadata("design:type", Number)
      ], G2MiniProgressComponent.prototype, "percent", void 0);
      __decorate([
          InputNumber(),
          __metadata("design:type", Number)
      ], G2MiniProgressComponent.prototype, "strokeWidth", void 0);
      return G2MiniProgressComponent;
  }());
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  /** @type {?} */
  var COMPONENTS = [G2MiniProgressComponent];
  var G2MiniProgressModule = /** @class */ (function () {
      function G2MiniProgressModule() {
      }
      G2MiniProgressModule.decorators = [
          { type: NgModule, args: [{
                      imports: [CommonModule, DelonUtilModule, DelonLocaleModule, NgZorroAntdModule],
                      declarations: __spread(COMPONENTS),
                      exports: __spread(COMPONENTS),
                  },] }
      ];
      return G2MiniProgressModule;
  }());
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  
  /**
   * @fileoverview added by tsickle
   * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
   */
  
  export { G2MiniProgressComponent, G2MiniProgressModule };
  
  //# sourceMappingURL=mini-progress.js.map