"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.compareLocalNodeIdentifiers = void 0;
const index_js_1 = require("../../util/index.js");
/**
 * Compares two {@link LocalNodeIdentifier}s.
 * All {@link LocalNodeIdentifier}s retrieved from a single SharedTree client can be totally ordered using this comparator.
 * @param a - the first identifier to compare
 * @param b - the second identifier to compare
 * @returns `0` if `a` and `b` are the same identifier, otherwise `-1` if `a` is ordered before `b` or `1` if `a` is ordered after `b`.
 */
function compareLocalNodeIdentifiers(a, b) {
    return a === b ? 0 : a > b ? 1 : -1;
}
exports.compareLocalNodeIdentifiers = compareLocalNodeIdentifiers;
/**
 * The TreeNodeSchemaIdentifier for node identifiers.
 * @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.nodeIdentifier.NodeIdentifier");
//# sourceMappingURL=nodeIdentifier.js.map