/*
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 { ValueType, toNullable, Boolean_$type, markStruct } from "igniteui-angular-core";
import { parseBool } from "igniteui-angular-core";
/**
 * @hidden
 */
export class ST_TrueFalse extends ValueType {
    constructor(a, ..._rest) {
        super();
        this.f = false;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0: break;
            case 1:
                {
                    let c = _rest[0];
                    this.f = c;
                }
                break;
        }
    }
    static d(a) {
        switch (a) {
            case "t": return ST_TrueFalse.b(true);
            case "f": return ST_TrueFalse.b(false);
        }
        return ST_TrueFalse.b(parseBool(a));
    }
    toString() {
        return this.f ? "t" : "f";
    }
    static k(a) {
        return a.toString();
    }
    static g(a) {
        return a.f;
    }
    static i(a) {
        if (!a.hasValue) {
            return toNullable(Boolean_$type, null);
        }
        return toNullable(Boolean_$type, ST_TrueFalse.g(a.value));
    }
    static b(a) {
        return new ST_TrueFalse(1, a);
    }
    static j(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);
//# sourceMappingURL=ST_TrueFalse.js.map