/*
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 { __extends, __values } from "tslib";
import { Base, toNullable, Number_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { CT_ValueColorEndPosition } from "./CT_ValueColorEndPosition";
import { CT_ValueColorMiddlePosition } from "./CT_ValueColorMiddlePosition";
import { CultureInfo } from "igniteui-angular-core";
import { parseInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
var CT_ValueColorPositions = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CT_ValueColorPositions, _super);
    function CT_ValueColorPositions() {
        var _this = _super.call(this) || this;
        _this.d = null;
        _this.f = null;
        _this.b = null;
        _this.i = toNullable(Number_$type, null);
        return _this;
    }
    Object.defineProperty(CT_ValueColorPositions.prototype, "c", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_ValueColorPositions.prototype, "e", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            this.f = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_ValueColorPositions.prototype, "a", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            this.b = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CT_ValueColorPositions.prototype, "h", {
        get: function () {
            return this.i;
        },
        set: function (a) {
            this.i = a;
        },
        enumerable: false,
        configurable: true
    });
    CT_ValueColorPositions.k = function (a, b) {
        var e_1, _a;
        b = toNullable(Number_$type, null);
        try {
            for (var _b = __values(fromEnum(a.ab.u)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                switch (c.a.e(a.d)) {
                    case "count":
                        b = toNullable(Number_$type, parseInt32_1(c.d, CultureInfo.invariantCulture));
                        break;
                    default: break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        ;
        return {
            p1: b
        };
    };
    CT_ValueColorPositions.l = function (a, b, c) {
        if (c === void 0) {
            c = toNullable(Number_$type, null);
        }
        a.ad.p(b, "cx");
        var d = null;
        var e = null;
        if (c.hasValue) {
            e = "count";
            d = c.value.toString();
            a.ad.h(e, d);
        }
        ;
    };
    CT_ValueColorPositions.prototype.setProperty = function (a, b) {
        switch (a) {
            case 1008:
                this.c = typeCast(CT_ValueColorEndPosition.$, b);
                break;
            case 1005:
                this.e = typeCast(CT_ValueColorMiddlePosition.$, b);
                break;
            case 984:
                this.a = typeCast(CT_ValueColorEndPosition.$, b);
                break;
            default: break;
        }
    };
    CT_ValueColorPositions.prototype.toString = function () {
        var a = getInstanceType(this);
        return a != null ? a.typeName : _super.prototype.toString.call(this);
    };
    CT_ValueColorPositions.$t = markType(CT_ValueColorPositions, 'CT_ValueColorPositions', Base.$, [ISupportSetProperty_$type]);
    return CT_ValueColorPositions;
}(Base));
export { CT_ValueColorPositions };
