/*
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 { Base, markType } from "igniteui-webcomponents-core";
import { IComparer$1_$type } from "igniteui-webcomponents-core";
import { ISupportPositioning_$type } from "./ISupportPositioning";
import { CoreUtilities } from "./CoreUtilities";
import { boolCompare } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let PositionOrderHelper_DefaultMeasureComparer$1 = /*@__PURE__*/ (() => {
    class PositionOrderHelper_DefaultMeasureComparer$1 extends Base {
        constructor($tChild, a) {
            super();
            this.$tChild = null;
            this._a = null;
            this.$tChild = $tChild;
            this.$type = this.$type.specialize(this.$tChild);
            this._a = a;
        }
        compare(a, b) {
            if (a == b) {
                return 0;
            }
            let c = CoreUtilities.g(a.after) || CoreUtilities.g(a.before);
            let d = CoreUtilities.g(b.after) || CoreUtilities.g(b.before);
            if (c != d) {
                return boolCompare(d, c);
            }
            return Base.compareSimple(this._a.indexOf(a), this._a.indexOf(b));
        }
    }
    PositionOrderHelper_DefaultMeasureComparer$1.$t = /*@__PURE__*/ markType(PositionOrderHelper_DefaultMeasureComparer$1, 'PositionOrderHelper_DefaultMeasureComparer$1', Base.$, [/*@__PURE__*/ IComparer$1_$type.specialize(ISupportPositioning_$type)]);
    return PositionOrderHelper_DefaultMeasureComparer$1;
})();
