/*
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 { ValueType, toNullable, Boolean_$type, markStruct } from "igniteui-angular-core";
import { parseBool } from "igniteui-angular-core";
/**
 * @hidden
 */
var ST_TrueFalse = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ST_TrueFalse, _super);
    function ST_TrueFalse(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = _super.call(this) || this;
        _this.f = false;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    var c = _rest[0];
                    _this.f = c;
                }
                break;
        }
        return _this;
    }
    ST_TrueFalse.d = function (a) {
        switch (a) {
            case "t": return ST_TrueFalse.b(true);
            case "f": return ST_TrueFalse.b(false);
        }
        return ST_TrueFalse.b(parseBool(a));
    };
    ST_TrueFalse.prototype.toString = function () {
        return this.f ? "t" : "f";
    };
    ST_TrueFalse.k = function (a) {
        return a.toString();
    };
    ST_TrueFalse.g = function (a) {
        return a.f;
    };
    ST_TrueFalse.i = function (a) {
        if (!a.hasValue) {
            return toNullable(Boolean_$type, null);
        }
        return toNullable(Boolean_$type, ST_TrueFalse.g(a.value));
    };
    ST_TrueFalse.b = function (a) {
        return new ST_TrueFalse(1, a);
    };
    ST_TrueFalse.j = function (a) {
        if (!a.hasValue) {
            return toNullable(ST_TrueFalse.$, null);
        }
        return toNullable(ST_TrueFalse.$, ST_TrueFalse.b(a.value));
    };
    ST_TrueFalse.$t = markStruct(ST_TrueFalse, 'ST_TrueFalse');
    ST_TrueFalse.a = new ST_TrueFalse(1, false);
    ST_TrueFalse.e = new ST_TrueFalse(1, true);
    return ST_TrueFalse;
}(ValueType));
export { ST_TrueFalse };
