/*
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 } from "tslib";
import { Base, toNullable, Number_$type, EnumUtil, markType } from "igniteui-angular-core";
import { ST_StyleColorEnum_$type } from "./ST_StyleColorEnum";
import { tryParseUInt32_2 } from "igniteui-angular-core";
/**
 * @hidden
 */
var ST_StyleColorVal = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ST_StyleColorVal, _super);
    function ST_StyleColorVal() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.c = toNullable(Number_$type, null);
        _this.d = toNullable(ST_StyleColorEnum_$type, null);
        _this.g = null;
        return _this;
    }
    Object.defineProperty(ST_StyleColorVal.prototype, "e", {
        get: function () {
            return this.c;
        },
        set: function (a) {
            this.c = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ST_StyleColorVal.prototype, "f", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            this.d = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ST_StyleColorVal.prototype, "j", {
        get: function () {
            return this.g;
        },
        set: function (a) {
            this.g = a;
        },
        enumerable: false,
        configurable: true
    });
    ST_StyleColorVal.a = function (a) {
        return ST_StyleColorVal.b(a);
    };
    ST_StyleColorVal.prototype.h = function () {
        return this.i();
    };
    ST_StyleColorVal.b = function (a) {
        var b = new ST_StyleColorVal();
        var c;
        var d;
        if (((function () { var e = tryParseUInt32_2(a, 7, null, c); c = e.p3; return e.ret; })())) {
            b.e = toNullable(Number_$type, c);
        }
        else if (((function () { var e = EnumUtil.tryParse$1(ST_StyleColorEnum_$type, a, true, d); d = e.p2; return e.ret; })())) {
            b.f = toNullable(ST_StyleColorEnum_$type, d);
        }
        else {
            b.j = a;
        }
        return b;
    };
    ST_StyleColorVal.prototype.i = function () {
        return this.e.hasValue ? this.e.value.toString() : this.f.hasValue ? EnumUtil.getName(ST_StyleColorEnum_$type, this.f.value) : this.j;
    };
    ST_StyleColorVal.$t = markType(ST_StyleColorVal, 'ST_StyleColorVal');
    return ST_StyleColorVal;
}(Base));
export { ST_StyleColorVal };
