/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { ContourValueResolver } from "./ContourValueResolver";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { Type, toEnum, markType } from "igniteui-react-core/ES5/type";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
/**
 * @hidden
 */
var LinearContourValueResolver = /** @class */ (function (_super) {
    tslib_1.__extends(LinearContourValueResolver, _super);
    function LinearContourValueResolver() {
        return _super.call(this) || this;
    }
    LinearContourValueResolver.prototype._j = function (a) {
        var b;
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    b = 0;
                    _a.label = 1;
                case 1:
                    if (!(b < this.valueCount)) return [3 /*break*/, 4];
                    return [4 /*yield*/, a.minimum + (a.maximum - a.minimum) * (b + 1) / (this.valueCount + 1)];
                case 2:
                    _a.sent();
                    _a.label = 3;
                case 3:
                    b++;
                    return [3 /*break*/, 1];
                case 4: return [2 /*return*/];
            }
        });
    };
    LinearContourValueResolver.prototype.j = function (a) {
        var _this = this;
        return toEnum(function () { return _this._j(a); });
    };
    LinearContourValueResolver.$t = markType(LinearContourValueResolver, 'LinearContourValueResolver', ContourValueResolver.$);
    return LinearContourValueResolver;
}(ContourValueResolver));
export { LinearContourValueResolver };
Type.dep(DependencyProperty, PropertyMetadata, LinearContourValueResolver, 'l', ['ValueCount::o', [1, 10]]);
