"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.nodeKeyTreeIdentifier = exports.compareLocalNodeKeys = void 0;
const index_js_1 = require("../../util/index.js");
/**
 * Compares two {@link LocalNodeKey}s.
 * All {@link LocalNodeKey}s retrieved from a single SharedTree client can be totally ordered using this comparator.
 * @param a - the first key to compare
 * @param b - the second key to compare
 * @returns `0` if `a` and `b` are the same key, otherwise `-1` if `a` is ordered before `b` or `1` if `a` is ordered after `b`.
 */
function compareLocalNodeKeys(a, b) {
    return a === b ? 0 : a > b ? 1 : -1;
}
exports.compareLocalNodeKeys = compareLocalNodeKeys;
/**
 * The TreeNodeSchemaIdentifier for node keys.
 * @privateRemarks TODO: Come up with a unified and collision-resistant naming schema for types defined by the system.
 * For now, we'll use `__` to reduce the change of collision, since this is what other internal properties use in Fluid.
 */
exports.nodeKeyTreeIdentifier = (0, index_js_1.brand)("com.fluidframework.nodeKey.NodeKey");
//# sourceMappingURL=nodeKey.js.map