/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
import * as tslib_1 from "tslib";
import { CommonModule } from '@angular/common';
import { Component, ElementRef, EventEmitter, HostBinding, Input, NgModule, Output, Renderer2, ViewChild } from '@angular/core';
/** @enum {string} */
var IgxTextAlign = {
    START: 'start',
    CENTER: 'center',
    END: 'end',
};
export { IgxTextAlign };
/**
 * @record
 */
export function IChangeProgressEventArgs() { }
function IChangeProgressEventArgs_tsickle_Closure_declarations() {
    /** @type {?} */
    IChangeProgressEventArgs.prototype.previousValue;
    /** @type {?} */
    IChangeProgressEventArgs.prototype.currentValue;
}
/**
 * @abstract
 */
var /**
 * @abstract
 */
BaseProgress = /** @class */ (function () {
    function BaseProgress() {
        /**
         * @hidden
         */
        this.requestAnimationId = undefined;
        /**
         * @hidden
         */
        this._valueInPercent = 0;
        /**
         * @hidden
         */
        this._max = 100;
        /**
         * @hidden
         */
        this._value = 0;
        /**
         * @hidden
         */
        this._animate = true;
    }
    Object.defineProperty(BaseProgress.prototype, "valueInPercent", {
        get: /**
         * Returns the `IgxLinearProgressBarComponent`/`IgxCircularProgressBarComponent` value in percentage.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxLinearProgressBarComponent; // IgxCircularProgressBarComponent
         * public valuePercent(event){
         *    let percentValue = this.progressBar.valueInPercent;
         *    alert(percentValue);
         * }
         * ```
         * @return {?}
         */
        function () {
            return this._valueInPercent;
        },
        set: /**
         * Sets the `IgxLinearProgressBarComponent`/`IgxCircularProgressBarComponent` value in percentage.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxLinearProgressBarComponent; // IgxCircularProgressBarComponent
         *    public setValue(event){
         *    this.progressBar.valueInPercent = 56;
         * }
         * //...
         * ```
         * ```html
         * <button igxButton="fab" igxRipple="" (click)="setValue()">setValue</button>
         * ```
         * @param {?} valInPercent
         * @return {?}
         */
        function (valInPercent) {
            var /** @type {?} */ valueInRange = getValueInProperRange(valInPercent, this._max);
            var /** @type {?} */ valueIntoPercentage = convertInPercentage(valueInRange, this._max);
            this._valueInPercent = valueIntoPercentage;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    BaseProgress.prototype.runAnimation = /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    function (val) {
        var _this = this;
        var /** @type {?} */ direction = this.directionFlow(this._value, val);
        if (!this.requestAnimationId) {
            this.requestAnimationId = requestAnimationFrame(function () { return _this.updateProgressSmoothly.call(_this, val, direction); });
        }
    };
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} val
     * @param {?} direction
     * @return {?}
     */
    BaseProgress.prototype.updateProgressSmoothly = /**
     * @hidden
     * @param {?} val
     * @param {?} direction
     * @return {?}
     */
    function (val, direction) {
        var _this = this;
        if (this._value === val) {
            this.requestAnimationId = undefined;
            return;
        }
        this._value += direction;
        this.valueInPercent = this._value;
        requestAnimationFrame(function () { return _this.updateProgressSmoothly.call(_this, val, direction); });
    };
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    BaseProgress.prototype.updateProgressDirectly = /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    function (val) {
        this._value = val;
        this.valueInPercent = this._value;
    };
    /**
     * @hidden
     */
    /**
     * @hidden
     * @param {?} currentValue
     * @param {?} prevValue
     * @return {?}
     */
    BaseProgress.prototype.directionFlow = /**
     * @hidden
     * @param {?} currentValue
     * @param {?} prevValue
     * @return {?}
     */
    function (currentValue, prevValue) {
        if (currentValue < prevValue) {
            return 1;
        }
        return -1;
    };
    return BaseProgress;
}());
/**
 * @abstract
 */
export { BaseProgress };
function BaseProgress_tsickle_Closure_declarations() {
    /**
     * @hidden
     * @type {?}
     */
    BaseProgress.prototype.requestAnimationId;
    /**
     * @hidden
     * @type {?}
     */
    BaseProgress.prototype._valueInPercent;
    /**
     * @hidden
     * @type {?}
     */
    BaseProgress.prototype._max;
    /**
     * @hidden
     * @type {?}
     */
    BaseProgress.prototype._value;
    /**
     * @hidden
     * @type {?}
     */
    BaseProgress.prototype._animate;
}
var /** @type {?} */ NEXT_LINEAR_ID = 0;
var /** @type {?} */ NEXT_CIRCULAR_ID = 0;
var IgxLinearProgressBarComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxLinearProgressBarComponent, _super);
    function IgxLinearProgressBarComponent(elementRef) {
        var _this = _super.call(this) || this;
        _this.elementRef = elementRef;
        /**
         * An \@Input property that sets the value of `id` attribute. If not provided it will be automatically generated.
         * ```html
         * <igx-linear-bar [id]="'igx-linear-bar-55'" [striped]="true" [max]="200" [value]="50"></igx-linear-bar>
         * ```
         */
        _this.id = "igx-linear-bar-" + NEXT_LINEAR_ID++;
        /**
         * Set the position that defines where the text is aligned.
         * Possible options - `IgxTextAlign.START` (default), `IgxTextAlign.CENTER`, `IgxTextAlign.END`.
         * ```typescript
         * public positionCenter: IgxTextAlign;
         * public ngOnInit() {
         *    this.positionCenter = IgxTextAlign.CENTER;
         * }
         * //...
         * ```
         * ```html
         * <igx-linear-bar type="warning" [text]="'Custom text'" [textAlign]="positionCenter" [striped]="true"></igx-linear-bar>
         * ```
         */
        _this.textAlign = IgxTextAlign.START;
        /**
         * Set the text to be visible. By default it is set to true.
         * ```html
         * <igx-linear-bar type="default" [textVisibility]="false"></igx-linear-bar>
         * ```
         */
        _this.textVisibility = true;
        /**
         * Set the position that defines if the text should be aligned above the progress line. By default is set to false.
         * ```html
         * <igx-linear-bar type="danger" [textTop]="true"></igx-linear-bar>
         * ```
         */
        _this.textTop = false;
        /**
         * Set `IgxLinearProgressBarComponent` to have striped style. By default it is set to false.
         * ```html
         * <igx-linear-bar [striped]="true" [max]="200" [value]="50"></igx-linear-bar>
         * ```
         */
        _this.striped = false;
        /**
         * Set type of the `IgxLinearProgressBarComponent`. Possible options - `default`, `success`, `info`, `warning`, and `danger`.
         * ```html
         * <igx-linear-bar [striped]="false" [max]="100" [value]="0" type="danger"></igx-linear-bar>
         * ```
         */
        _this.type = 'default';
        /**
         * An event, which is triggered after a progress is changed.
         * ```typescript
         * public progressChange(event) {
         *    alert("Progress made!");
         * }
         * //...
         * ```
         * ```html
         * <igx-linear-bar (onProgressChanged)="progressChange($event)" type="success">
         * ```
         */
        _this.onProgressChanged = new EventEmitter();
        return _this;
    }
    Object.defineProperty(IgxLinearProgressBarComponent.prototype, "animate", {
        /**
         *Returns whether the `IgxLinearProgressBarComponent` has animation true/false.
         *```typescript
         *@ViewChild("MyProgressBar")
         *public progressBar: IgxLinearProgressBarComponent;
         *public animationStatus(event) {
         *    let animationStatus = this.progressBar.animate;
         *    alert(animationStatus);
         *}
         *```
         */
        get: /**
         * Returns whether the `IgxLinearProgressBarComponent` has animation true/false.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxLinearProgressBarComponent;
         * public animationStatus(event) {
         *    let animationStatus = this.progressBar.animate;
         *    alert(animationStatus);
         * }
         * ```
         * @return {?}
         */
        function () {
            return this._animate;
        },
        set: /**
         * Animation on progress `IgxLinearProgressBarComponent`. By default it is set to true.
         * ```html
         * <igx-linear-bar [animate]="false" [striped]="true" [max]="200" [value]="50"></igx-linear-bar>
         * ```
         * @param {?} animate
         * @return {?}
         */
        function (animate) {
            this._animate = animate;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxLinearProgressBarComponent.prototype, "max", {
        /**
         *Returns the the maximum progress value of the `IgxLinearProgressBarComponent`.
         *```typescript
         *@ViewChild("MyProgressBar")
         *public progressBar: IgxLinearProgressBarComponent;
         *public maxValue(event) {
         *    let max = this.progressBar.max;
         *    alert(max);
         *}
         *```
         */
        get: /**
         * Returns the the maximum progress value of the `IgxLinearProgressBarComponent`.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxLinearProgressBarComponent;
         * public maxValue(event) {
         *    let max = this.progressBar.max;
         *    alert(max);
         * }
         * ```
         * @return {?}
         */
        function () {
            return this._max;
        },
        set: /**
         * Set maximum value that can be passed. By default it is set to 100.
         * ```html
         * <igx-linear-bar [striped]="false" [max]="200" [value]="0"></igx-linear-bar>
         * ```
         * @param {?} maxNum
         * @return {?}
         */
        function (maxNum) {
            this._max = maxNum;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxLinearProgressBarComponent.prototype, "value", {
        get: /**
         * Returns value that indicates the current `IgxLinearProgressBarComponent` position.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxLinearProgressBarComponent;
         * public getValue(event) {
         *    let value = this.progressBar.value;
         *    alert(value);
         * }
         * ```
         * @return {?}
         */
        function () {
            return this._value;
        },
        /**
         *Set value that indicates the current `IgxLinearProgressBarComponent` position.
         *```html
         *<igx-linear-bar [striped]="false" [max]="200" [value]="50"></igx-linear-bar>
         *```
         */
        set: /**
         * Set value that indicates the current `IgxLinearProgressBarComponent` position.
         * ```html
         * <igx-linear-bar [striped]="false" [max]="200" [value]="50"></igx-linear-bar>
         * ```
         * @param {?} val
         * @return {?}
         */
        function (val) {
            if (this._value === val) {
                return;
            }
            var /** @type {?} */ valueInRange = getValueInProperRange(val, this.max);
            if (isNaN(valueInRange)) {
                return;
            }
            var /** @type {?} */ changedValues = {
                currentValue: valueInRange,
                previousValue: this._value
            };
            if (this._animate) {
                _super.prototype.runAnimation.call(this, valueInRange);
            }
            else {
                _super.prototype.updateProgressDirectly.call(this, valueInRange);
            }
            this.onProgressChanged.emit(changedValues);
        },
        enumerable: true,
        configurable: true
    });
    IgxLinearProgressBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'igx-linear-bar',
                    template: "<div class=\"progress-linear\" [class.progress-linear--striped]=\"striped\">\n    <div class=\"progress-linear__bar\" #linearBar role=\"progressbar\" aria-valuemin=\"0\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\">\n        <div class=\"progress-linear__bar-base\"></div>\n        <div class=\"progress-linear__bar-progress{{type ? '--' + type : ''}}\" [style.width.%]=\"valueInPercent\"></div>\n    </div>\n    <span \n        class=\"progress-linear__value{{textAlign ? '--' + textAlign : ''}}\"\n        [class.progress-linear__value--top]=\"textTop\"\n        [class.progress-linear__value--hidden]=\"!textVisibility\">\n            {{text ? text : valueInPercent + '%'}}\n    </span>\n</div>\n"
                },] },
    ];
    /** @nocollapse */
    IgxLinearProgressBarComponent.ctorParameters = function () { return [
        { type: ElementRef, },
    ]; };
    IgxLinearProgressBarComponent.propDecorators = {
        "id": [{ type: HostBinding, args: ['attr.id',] }, { type: Input },],
        "textAlign": [{ type: Input },],
        "textVisibility": [{ type: Input },],
        "textTop": [{ type: Input },],
        "text": [{ type: Input },],
        "striped": [{ type: Input },],
        "type": [{ type: Input },],
        "animate": [{ type: Input },],
        "max": [{ type: Input },],
        "value": [{ type: Input },],
        "onProgressChanged": [{ type: Output },],
    };
    return IgxLinearProgressBarComponent;
}(BaseProgress));
export { IgxLinearProgressBarComponent };
function IgxLinearProgressBarComponent_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxLinearProgressBarComponent.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxLinearProgressBarComponent.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxLinearProgressBarComponent.propDecorators;
    /**
     * An \@Input property that sets the value of `id` attribute. If not provided it will be automatically generated.
     * ```html
     * <igx-linear-bar [id]="'igx-linear-bar-55'" [striped]="true" [max]="200" [value]="50"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.id;
    /**
     * Set the position that defines where the text is aligned.
     * Possible options - `IgxTextAlign.START` (default), `IgxTextAlign.CENTER`, `IgxTextAlign.END`.
     * ```typescript
     * public positionCenter: IgxTextAlign;
     * public ngOnInit() {
     *    this.positionCenter = IgxTextAlign.CENTER;
     * }
     * //...
     * ```
     * ```html
     * <igx-linear-bar type="warning" [text]="'Custom text'" [textAlign]="positionCenter" [striped]="true"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.textAlign;
    /**
     * Set the text to be visible. By default it is set to true.
     * ```html
     * <igx-linear-bar type="default" [textVisibility]="false"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.textVisibility;
    /**
     * Set the position that defines if the text should be aligned above the progress line. By default is set to false.
     * ```html
     * <igx-linear-bar type="danger" [textTop]="true"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.textTop;
    /**
     * Set a custom text that is displayed according to the defined position.
     * ```html
     * <igx-linear-bar type="warning" [text]="'Custom text'" [textAlign]="positionCenter" [striped]="true"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.text;
    /**
     * Set `IgxLinearProgressBarComponent` to have striped style. By default it is set to false.
     * ```html
     * <igx-linear-bar [striped]="true" [max]="200" [value]="50"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.striped;
    /**
     * Set type of the `IgxLinearProgressBarComponent`. Possible options - `default`, `success`, `info`, `warning`, and `danger`.
     * ```html
     * <igx-linear-bar [striped]="false" [max]="100" [value]="0" type="danger"></igx-linear-bar>
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.type;
    /**
     * An event, which is triggered after a progress is changed.
     * ```typescript
     * public progressChange(event) {
     *    alert("Progress made!");
     * }
     * //...
     * ```
     * ```html
     * <igx-linear-bar (onProgressChanged)="progressChange($event)" type="success">
     * ```
     * @type {?}
     */
    IgxLinearProgressBarComponent.prototype.onProgressChanged;
    /** @type {?} */
    IgxLinearProgressBarComponent.prototype.elementRef;
}
var IgxCircularProgressBarComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxCircularProgressBarComponent, _super);
    function IgxCircularProgressBarComponent(elementRef, renderer) {
        var _this = _super.call(this) || this;
        _this.elementRef = elementRef;
        _this.renderer = renderer;
        _this.STROKE_OPACITY_DVIDER = 100;
        _this.STROKE_OPACITY_ADDITION = .2;
        /**
         * An event, which is triggered after a progress is changed.
         * ```typescript
         * public progressChange(event) {
         *    alert("Progress made!");
         * }
         * //...
         * ```
         * ```html
         * <igx-circular-bar [value]="currentValue" (onProgressChanged)="progressChange($event)"></igx-circular-bar>
         * ```
         */
        _this.onProgressChanged = new EventEmitter();
        /**
         * An \@Input property that sets the value of `id` attribute. If not provided it will be automatically generated.
         * ```html
         * <igx-circular-bar [id]="'igx-circular-bar-55'" [value]="50"></igx-circular-bar>
         * ```
         */
        _this.id = "igx-circular-bar-" + NEXT_CIRCULAR_ID++;
        /**
         * Sets the text visibility. By default it is set to true.
         * ```html
         * <igx-circular-bar [textVisibility]="false"></igx-circular-bar>
         * ```
         */
        _this.textVisibility = true;
        _this._radius = 0;
        return _this;
    }
    Object.defineProperty(IgxCircularProgressBarComponent.prototype, "animate", {
        /**
         *Returns whether the `IgxCircularProgressBarComponent` has animation true/false.
         *```typescript
         *@ViewChild("MyProgressBar")
         *public progressBar: IgxCircularProgressBarComponent;
         *public animationStatus(event) {
         *    let animationStatus = this.progressBar.animate;
         *    alert(animationStatus);
         *}
         *```
         */
        get: /**
         * Returns whether the `IgxCircularProgressBarComponent` has animation true/false.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxCircularProgressBarComponent;
         * public animationStatus(event) {
         *    let animationStatus = this.progressBar.animate;
         *    alert(animationStatus);
         * }
         * ```
         * @return {?}
         */
        function () {
            return this._animate;
        },
        set: /**
         * Animation on progress `IgxCircularProgressBarComponent`. By default it is set to true.
         * ```html
         * <igx-circular-bar [animate]="false" [value]="50"></igx-circular-bar>
         * ```
         * @param {?} animate
         * @return {?}
         */
        function (animate) {
            this._animate = animate;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCircularProgressBarComponent.prototype, "max", {
        /**
         *Returns the the maximum progress value of the `IgxCircularProgressBarComponent`.
         *```typescript
         *@ViewChild("MyProgressBar")
         *public progressBar: IgxCircularProgressBarComponent;
         *public maxValue(event) {
         *    let max = this.progressBar.max;
         *    alert(max);
         *}
         *```
         *```html
         *<igx-circular-bar [max]="245" [animate]="false" [value]="currentValue"></igx-circular-bar>
         *```
         */
        get: /**
         * Returns the the maximum progress value of the `IgxCircularProgressBarComponent`.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxCircularProgressBarComponent;
         * public maxValue(event) {
         *    let max = this.progressBar.max;
         *    alert(max);
         * }
         * ```
         * ```html
         * <igx-circular-bar [max]="245" [animate]="false" [value]="currentValue"></igx-circular-bar>
         * ```
         * @return {?}
         */
        function () {
            return this._max;
        },
        set: /**
         * Set maximum value that can be passed. By default it is set to 100.
         * ```html
         * <igx-circular-bar [max]="200" [value]="0"></igx-circular-bar>
         * ```
         * @param {?} maxNum
         * @return {?}
         */
        function (maxNum) {
            this._max = maxNum;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxCircularProgressBarComponent.prototype, "value", {
        get: /**
         * Returns value that indicates the current `IgxCircularProgressBarComponent` position.
         * ```typescript
         * \@ViewChild("MyProgressBar")
         * public progressBar: IgxCircularProgressBarComponent;
         * public getValue(event) {
         *    let value = this.progressBar.value;
         *    alert(value);
         * }
         * ```
         * ```html
         * <button igxButton="fab" igxRipple="" (click)="getValue()">Click</button>
         * ```
         * @return {?}
         */
        function () {
            return this._value;
        },
        /**
         *Set value that indicates the current `IgxCircularProgressBarComponent` position.
         *```html
         *<igx-circular-bar [value]="50"></igx-circular-bar>
         *```
         */
        set: /**
         * Set value that indicates the current `IgxCircularProgressBarComponent` position.
         * ```html
         * <igx-circular-bar [value]="50"></igx-circular-bar>
         * ```
         * @param {?} val
         * @return {?}
         */
        function (val) {
            if (this._value === val) {
                return;
            }
            var /** @type {?} */ valueInProperRange = getValueInProperRange(val, this.max);
            if (isNaN(valueInProperRange)) {
                return;
            }
            var /** @type {?} */ changedValues = {
                currentValue: valueInProperRange,
                previousValue: this._value
            };
            if (this.animate) {
                _super.prototype.runAnimation.call(this, valueInProperRange);
            }
            else {
                this.updateProgressDirectly(valueInProperRange);
            }
            this.onProgressChanged.emit(changedValues);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @hidden
     * @return {?}
     */
    IgxCircularProgressBarComponent.prototype.ngAfterViewInit = /**
     * @hidden
     * @return {?}
     */
    function () {
        this._radius = parseInt(this._svgCircle.nativeElement.getAttribute('r'), 10);
        this._circumference = 2 * Math.PI * this._radius;
    };
    /**
     * @hidden
     * @param {?} val
     * @param {?} direction
     * @return {?}
     */
    IgxCircularProgressBarComponent.prototype.updateProgressSmoothly = /**
     * @hidden
     * @param {?} val
     * @param {?} direction
     * @return {?}
     */
    function (val, direction) {
        // Set frames for the animation
        var /** @type {?} */ FRAMES = [{
                strokeDashoffset: this.getProgress(this._value),
                strokeOpacity: (this._value / this.STROKE_OPACITY_DVIDER) + this.STROKE_OPACITY_ADDITION
            }, {
                strokeDashoffset: this.getProgress(this.valueInPercent),
                strokeOpacity: (this.valueInPercent / this.STROKE_OPACITY_DVIDER) + this.STROKE_OPACITY_ADDITION
            }];
        this._svgCircle.nativeElement.animate(FRAMES, {
            easing: 'ease-out',
            fill: 'forwards'
        });
        _super.prototype.updateProgressSmoothly.call(this, val, direction);
    };
    /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    IgxCircularProgressBarComponent.prototype.updateProgressDirectly = /**
     * @hidden
     * @param {?} val
     * @return {?}
     */
    function (val) {
        _super.prototype.updateProgressDirectly.call(this, val);
        this.renderer.setStyle(this._svgCircle.nativeElement, 'stroke-dashoffset', this.getProgress(this.valueInPercent));
        this.renderer.setStyle(this._svgCircle.nativeElement, 'stroke-opacity', (this.valueInPercent / this.STROKE_OPACITY_DVIDER) + this.STROKE_OPACITY_ADDITION);
    };
    /**
     * @param {?} percentage
     * @return {?}
     */
    IgxCircularProgressBarComponent.prototype.getProgress = /**
     * @param {?} percentage
     * @return {?}
     */
    function (percentage) {
        return this._circumference - (percentage * this._circumference / 100);
    };
    IgxCircularProgressBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'igx-circular-bar',
                    template: "<svg #svg class=\"progress-circular\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"\n    viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" role=\"progressbar\" aria-valuemin=\"0\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\">\n    <circle class=\"progress-circular__innercircle\" cx=\"50\" cy=\"50\" r=\"46\" />\n    <circle #circle class=\"progress-circular__circle\" cx=\"50\" cy=\"50\" r=\"46\" />\n    <text #text class=\"progress-circular__text\" [class.progress-circular__text--hidden]=\"!textVisibility\" id=\"myTimer\" text-anchor=\"middle\" x=\"50\" y=\"60\">\n        {{valueInPercent}}%\n    </text>\n</svg>"
                },] },
    ];
    /** @nocollapse */
    IgxCircularProgressBarComponent.ctorParameters = function () { return [
        { type: ElementRef, },
        { type: Renderer2, },
    ]; };
    IgxCircularProgressBarComponent.propDecorators = {
        "onProgressChanged": [{ type: Output },],
        "id": [{ type: HostBinding, args: ['attr.id',] }, { type: Input },],
        "textVisibility": [{ type: Input },],
        "animate": [{ type: Input },],
        "max": [{ type: Input },],
        "value": [{ type: Input },],
        "_svgCircle": [{ type: ViewChild, args: ['circle',] },],
        "_svgText": [{ type: ViewChild, args: ['text',] },],
    };
    return IgxCircularProgressBarComponent;
}(BaseProgress));
export { IgxCircularProgressBarComponent };
function IgxCircularProgressBarComponent_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxCircularProgressBarComponent.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxCircularProgressBarComponent.ctorParameters;
    /** @type {!Object<string,!Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
    IgxCircularProgressBarComponent.propDecorators;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype.STROKE_OPACITY_DVIDER;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype.STROKE_OPACITY_ADDITION;
    /**
     * An event, which is triggered after a progress is changed.
     * ```typescript
     * public progressChange(event) {
     *    alert("Progress made!");
     * }
     * //...
     * ```
     * ```html
     * <igx-circular-bar [value]="currentValue" (onProgressChanged)="progressChange($event)"></igx-circular-bar>
     * ```
     * @type {?}
     */
    IgxCircularProgressBarComponent.prototype.onProgressChanged;
    /**
     * An \@Input property that sets the value of `id` attribute. If not provided it will be automatically generated.
     * ```html
     * <igx-circular-bar [id]="'igx-circular-bar-55'" [value]="50"></igx-circular-bar>
     * ```
     * @type {?}
     */
    IgxCircularProgressBarComponent.prototype.id;
    /**
     * Sets the text visibility. By default it is set to true.
     * ```html
     * <igx-circular-bar [textVisibility]="false"></igx-circular-bar>
     * ```
     * @type {?}
     */
    IgxCircularProgressBarComponent.prototype.textVisibility;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype._radius;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype._circumference;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype._svgCircle;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype._svgText;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype.elementRef;
    /** @type {?} */
    IgxCircularProgressBarComponent.prototype.renderer;
}
/**
 * @param {?} value
 * @param {?} max
 * @param {?=} min
 * @return {?}
 */
export function getValueInProperRange(value, max, min) {
    if (min === void 0) { min = 0; }
    return Math.max(Math.min(value, max), min);
}
/**
 * @param {?} value
 * @param {?} max
 * @return {?}
 */
export function convertInPercentage(value, max) {
    return Math.floor(100 * value / max);
}
/**
 * The IgxProgressBarModule provides the {\@link IgxLinearProgressBarComponent},
 * {\@link IgxCircularProgressBarComponent} inside your application.
 */
var IgxProgressBarModule = /** @class */ (function () {
    function IgxProgressBarModule() {
    }
    IgxProgressBarModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent],
                    exports: [IgxLinearProgressBarComponent, IgxCircularProgressBarComponent],
                    imports: [CommonModule]
                },] },
    ];
    return IgxProgressBarModule;
}());
export { IgxProgressBarModule };
function IgxProgressBarModule_tsickle_Closure_declarations() {
    /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
    IgxProgressBarModule.decorators;
    /**
     * @nocollapse
     * @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
     */
    IgxProgressBarModule.ctorParameters;
}

//# sourceMappingURL=data:application/json;base64, 