/*
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, markType } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
import { stringFormat } from "igniteui-angular-core";
import { stringIsNullOrEmpty, stringEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
var XValue = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(XValue, _super);
    function XValue() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.d = 0;
        _this.b = 0;
        _this.f = null;
        _this.a = null;
        return _this;
    }
    Object.defineProperty(XValue.prototype, "c", {
        get: function () {
            return isNaN_(this.b) == false ? this.b : this.d;
        },
        enumerable: false,
        configurable: true
    });
    XValue.prototype.toString = function () {
        if (isNaN_(this.b) == false) {
            return stringFormat("Number: {0}", this.b);
        }
        else if (stringIsNullOrEmpty(this.f) == false) {
            return stringFormat("String: {0}", this.f);
        }
        else {
            var a = this.e();
            return stringFormat("StringArray: {0}", a);
        }
    };
    XValue.prototype.e = function (a) {
        if (a === void 0) {
            a = ", ";
        }
        if (this.a == null) {
            return stringEmpty();
        }
        var b = new StringBuilder(0);
        for (var c = 0; c < this.a.length; c++) {
            if (c > 0) {
                b.l(a);
            }
            b.l(this.a[c]);
        }
        return b.toString();
    };
    XValue.$t = markType(XValue, 'XValue');
    return XValue;
}(Base));
export { XValue };
