/*
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, Base, typeCast, enumGetBox, markStruct } from "igniteui-angular-core";
import { FormatConditionValueType_$type } from "./FormatConditionValueType";
import { stringFormat } from "igniteui-angular-core";
/**
 * @hidden
 */
export let ConditionValueInfo = /*@__PURE__*/ (() => {
    class ConditionValueInfo extends ValueType {
        constructor(a, ..._rest) {
            super();
            this.h = 0;
            this.a = 0;
            a = (a == void 0) ? 0 : a;
            switch (a) {
                case 0: break;
                case 1:
                    {
                        let c = _rest[0];
                        let d = _rest[1];
                        this.h = c;
                        this.a = d;
                    }
                    break;
            }
        }
        equals(a) {
            if (typeCast(ConditionValueInfo.$, a) !== null) {
                return a.h == this.h && a.a == this.a;
            }
            return false;
        }
        getHashCode() {
            return (this.h) ^ Base.getHashCodeStatic(this.a);
        }
        toString() {
            return stringFormat("Value: {0}, ValueType: {1}", this.h, enumGetBox(FormatConditionValueType_$type, this.a));
        }
        static b(a, b) {
            return a.equals(b);
        }
        static c(a, b) {
            if (!a.hasValue) {
                return !b.hasValue;
            }
            else if (!b.hasValue) {
                return false;
            }
            return ConditionValueInfo.b(a.value, b.value);
        }
        static d(a, b) {
            return !(ConditionValueInfo.b(a, b));
        }
        static e(a, b) {
            if (!a.hasValue) {
                return b.hasValue;
            }
            else if (!b.hasValue) {
                return true;
            }
            return ConditionValueInfo.d(a.value, b.value);
        }
    }
    ConditionValueInfo.$t = markStruct(ConditionValueInfo, 'ConditionValueInfo');
    return ConditionValueInfo;
})();
